[PATCH] D123064: [Clang][C++23] P2071 Named universal character escapes

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 14 00:59:15 PDT 2022


cor3ntin marked an inline comment as done.
cor3ntin added inline comments.


================
Comment at: clang/lib/Lex/Lexer.cpp:3237-3239
+  if (C != '{') {
+    if (Diagnose)
+      Diag(StartPtr, diag::warn_ucn_escape_incomplete);
----------------
aaron.ballman wrote:
> Is this a case where we might want a fixit because the user did `\N` when they meant to do `\n`?
> 
> (Should we look for `\N(` and fixit that to `\N{`?)
I think if we wanted to diagnose \n we should also diagnose \U, which we don't do, Maybe a follow up patch, what do you think?
I can't imagine trying to be smart about `\N(` would be exercised  by many users


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123064/new/

https://reviews.llvm.org/D123064



More information about the cfe-commits mailing list