================ @@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() { FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth, Encoding); } +void FormatTokenLexer::handleTableGenNumericLikeIdentifier() { + FormatToken *Tok = Tokens.back(); + // TableGen identifiers can begin with digits. Such tokens are lexed as + // numeric_constant now. + if (Tok->isNot(tok::numeric_constant)) + return; + StringRef Text = Tok->TokenText; + // Identifiers cannot begin with + or -. + if (Text.size() < 1 || Text[0] == '+' || Text[0] == '-') + return; + // The following check is based on llvm::TGLexer::LexToken. + if (isdigit(Text[0])) { ---------------- hnakamura5 wrote:
Removed this check. https://github.com/llvm/llvm-project/pull/78571 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits