[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
Wed Nov 30 05:05:33 PST 2022


aaron.ballman added inline comments.


================
Comment at: clang/lib/Lex/Lexer.cpp:3312
   unsigned CharSize;
+
   bool Diagnose = Result && !isLexingRawMode();
----------------
Spurious whitespace


================
Comment at: clang/lib/Lex/Lexer.cpp:3379
 
-  if (LooseMatch)
+  if (LooseMatch && Diagnose)
     Res = LooseMatch->CodePoint;
----------------
Why do we only want to do this if we're diagnosing?


================
Comment at: clang/lib/Lex/Lexer.cpp:3382-3384
   if (Result) {
     Result->setFlag(Token::HasUCN);
   }
----------------



================
Comment at: clang/test/Preprocessor/ucn-pp-identifier.c:132-134
-#define CONCAT(A, B) A##B
-int CONCAT(\N{GREEK, CAPITALLETTERALPHA}); // expected-error{{expected}} \
-                                           // expected-warning {{incomplete delimited universal character name}}
----------------
Why did this test get removed?


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