[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-22 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG341dd6076b12: [Lex] Fix a crash in updateConsecutiveMacroArgTokens. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 499405. hokein marked 2 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144054/new/ https://reviews.llvm.org/D144054 Files:

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Lex/TokenLexer.cpp:1029 + // Including Limit will not mischeck for across-file-id tokens + // because SourceManager allocates

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Lex/TokenLexer.cpp:1023 Partition = All.take_while([&](const Token ) { - return T.getLocation() >= BeginLoc && T.getLocation() < Limit && - NearLast(T.getLocation()); + // NOTE: the Limit is included!

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-14 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Lex/TokenLexer.cpp:1023 Partition = All.take_while([&](const Token ) { - return T.getLocation() >= BeginLoc && T.getLocation() < Limit && - NearLast(T.getLocation()); + // NOTE: the Limit is included!

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/test/Lexer/update_consecutive_macro_crash.cpp:8 +void foo() { + X(int{,}); // expected-error {{too many arguments provided to function-like macro invocation}} \ + expected-error {{expected expression}} \

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Fixes https://github.com/llvm/llvm-project/issues/60722. Repository: rG LLVM Github Monorepo