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
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:
clang/lib/Lex/Token
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 FileSi
hokein added inline comments.
Comment at: clang/lib/Lex/TokenLexer.cpp:1023
Partition = All.take_while([&](const Token &T) {
- return T.getLocation() >= BeginLoc && T.getLocation() < Limit &&
- NearLast(T.getLocation());
+ // NOTE: the Limit is included
shafik added inline comments.
Comment at: clang/lib/Lex/TokenLexer.cpp:1023
Partition = All.take_while([&](const Token &T) {
- return T.getLocation() >= BeginLoc && T.getLocation() < Limit &&
- NearLast(T.getLocation());
+ // NOTE: the Limit is included
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}} \
--
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
https://reviews.llvm.org/D144054