[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 10:15:29 PDT 2024
================
@@ -1241,7 +1260,9 @@ bool NumericLiteralParser::isValidUDSuffix(const LangOptions &LangOpts,
return false;
// By C++11 [lex.ext]p10, ud-suffixes starting with an '_' are always valid.
- if (Suffix[0] == '_')
+ // Suffixes starting with '__' (double underscore) are for use by
+ // implementation.
+ if (Suffix[0] == '_' && Suffix[1] != '_')
----------------
AaronBallman wrote:
Example code that causes an assertion now:
```
unsigned operator ""_(const char *);
unsigned i = 1_;
```
https://github.com/llvm/llvm-project/pull/86586
More information about the cfe-commits
mailing list