-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enh(cpp) add C++26 keywords, #embed, and compiler-builtin types #4218
base: main
Are you sure you want to change the base?
Conversation
Build Size ReportChanges to minified artifacts in 7 files changedTotal change +109 B View Changes
|
Looks good. Need rebase and and entry added to changelog. Thanks. |
Build Size ReportChanges to minified artifacts in 7 files changedTotal change +114 B View Changes
|
@joshgoebel Could you help me out with this one? I'm kinda clueless as to how I can make the following test cases work, which are currently failing: void throwing(int x) noexcept(false);
void contracts(int x) pre(x > 10) post(r : r != 0); highlight.js treats I think the way to fix it is to simply exclude keywords from being function titles, but doing so breaks highlighting for the function completely. Or perhaps after seeing the closing parenthesis that ends the parameter list, anything up to |
Maybe it's because this implementation is trying to hard to think like a full parser. Use of |
Related to #4214.
Changes
#embed
as a known preprocessor directivecontract_assert
,pre
, andpost
keywords_Atomic
and_BitInt
keywordsAs for the last change, Clang supports
_Atomic
and_BitInt
keywords in C++ mode as well, with the same semantics as in C. I am also working on a proposal that introduces bit-precise integers to C++, and either through standardization or common practice, at least_BitInt
is expected to become a common non-standard keyword.Checklist
CHANGES.md
The test expectations depend on decisions made in #4217, so I haven't written tests yet.