[PATCH] D146924: [clang] Add support for dollar sign in ud_suffix of numeric constants

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 26 15:03:26 PDT 2023


tahonermann added a comment.

@cor3ntin, do you have any thoughts about this? CWG 1871 (Non-identifier characters in ud-suffix) <https://wg21.link/cwg1871> is somewhat related. I think the changed behavior makes sense when `-fdollars-in-identifiers` is in effect (which is the default).



================
Comment at: clang/test/CXX/lex/lex.literal/lex.ext/p3.cpp:20-21
+
+int operator "" _$ (unsigned long long);
+int i6 = 42_$;
----------------
If we're going to allow `$` in user-defined literal (UDL) suffixes, then I think we should do so for all UDL kinds (and have tests for each kind).

We should also test for `$` specified as a UCN (`\u0024`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146924



More information about the cfe-commits mailing list