[PATCH] D138861: [Clang] Implement CWG2640 Allow more characters in an n-char sequence
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 29 09:39:44 PST 2022
aaron.ballman added a comment.
Don't forget the release note! :-)
================
Comment at: clang/lib/Lex/Lexer.cpp:3338
- if (!isAlphanumeric(C) && C != '_' && C != '-' && C != ' ')
+ if (C == '\n' || C == '\r')
break;
----------------
`isVerticalWhitespace()`?
================
Comment at: clang/lib/Lex/LiteralSupport.cpp:552
+ const char *ClosingBrace = std::find_if(ThisTokBuf, ThisTokEnd, [](char C) {
+ return C == '}' || C == '\n' || C == '\r';
+ });
----------------
`isVerticalWhitespace()`?
================
Comment at: clang/test/CXX/drs/dr26xx.cpp:37
+const char* emoji = "\N{🤡}"; // expected-error {{'🤡' is not a valid Unicode character name}} \
+ // expected-note 5{{did you mean}}
+
----------------
Should you add:
```
#define z(x) 0
#define a z(
int x = a\N{abc});
```
from the issue as a test case as well?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138861/new/
https://reviews.llvm.org/D138861
More information about the cfe-commits
mailing list