[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 31 03:53:53 PST 2024
================
@@ -1032,6 +1033,21 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling,
isFloat = true;
continue; // Success.
+ // C++23 5.13.4 [lex.fcon]
+ case 'b':
+ case 'B':
+ if (!isFPConstant)
+ break; // Error for integer constant.
+ if (s + 3 < ThisTokEnd && (s[1] == 'f' || s[1] == 'F') && s[2] == '1' &&
+ s[3] == '6') {
----------------
cor3ntin wrote:
This allows for `Bf` and `bF` which are not supposed to be allowed to work.
I'd rather we use StringRef::compare
https://github.com/llvm/llvm-project/pull/78503
More information about the cfe-commits
mailing list