[PATCH] D138861: [Clang] Implement CWG2640 Allow more characters in an n-char sequence

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 15:38:44 PST 2022


cor3ntin added inline comments.


================
Comment at: clang/test/CXX/drs/dr26xx.cpp:41
+#define a z(
+int x = a\N{abc}); // expected-error 2{{'abc' is not a valid Unicode character name}}
+
----------------
aaron.ballman wrote:
> Why do we get two errors here?
> 
> Also, can you add this case:
> ```
> int y = a\N{LOTUS});
> ```
> to show that we now form an identifier for `a\N{LOTUS}` instead of trying to expand `a` as a macro; we should get a new diagnostic about the stray `)` instead.
I did manage to improve that a bit, took a while.
The tradeoff is slightly subpar recovery in some cases


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