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

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 01:35:29 PDT 2023


cor3ntin added a comment.

The commit message is certainly not correct, `$` is not allowed in identifiers by either the C or C++ standard and its support in compiler is hurting future evolution.
that being said, given that we already do do use it in identifiers, why not in UCNs.

I would like to see a test that ensures `42$` without underscore is ill-formed though, as this would have severe implication for evolution. 
if this aimes to fix the github issue, i think we need to understand why the difference of behavior with the euro sign - which should not be (and isn't) allowed either.

GCC seems to allow both in non pedantic mode, which may explain the struggles of clang format users


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