================ @@ -1117,6 +1118,26 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. + case '_': + if (isFPConstant) + break; // Invalid for floats + if (HasSize) + break; + if (PossibleBitInt) + break; // Cannot be repeated. + if (LangOpts.CPlusPlus && s[1] == '_') { ---------------- AaronBallman wrote:
This looks like it will read off the end of the buffer if `s + 1 >= ThisTokEnd`, so that should be guarded (and a test case added for that situation). https://github.com/llvm/llvm-project/pull/86586 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits