================ @@ -1017,11 +1018,13 @@ lltok::Kind LLLexer::LexIdentifier() { } // Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by - // the CFE to avoid forcing it to deal with 64-bit numbers. - if ((TokStart[0] == 'u' || TokStart[0] == 's') && + // the CFE to avoid forcing it to deal with 64-bit numbers. Also check for + // f0x[0-9A-Fa-f]+, which is the floating-point hexadecimal literal constant. + if ((TokStart[0] == 'u' || TokStart[0] == 's' || TokStart[0] == 'f') && TokStart[1] == '0' && TokStart[2] == 'x' && isxdigit(static_cast<unsigned char>(TokStart[3]))) { - int len = CurPtr-TokStart-3; + bool IsFloatConst = TokStart[0] == 'f'; + int len = CurPtr - TokStart - 3; ---------------- mshockwave wrote:
I know it's from the old code but since we're changing it anyway could you make it `Len`? Also, why `int` rather than `unsigned` or `size_t` https://github.com/llvm/llvm-project/pull/121838 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits