Our previous definition of "top-level" was too informal, and didn't
allow for overlapping macros that each directly produce expanded tokens.
See D77507 for previous discussion.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
120 ms | lldb-unit.Host/_/HostTests::Unknown Unit Message ("") |
Event Timeline
LGTM, thanks!
clang/lib/Tooling/Syntax/Tokens.cpp | ||
---|---|---|
452 | instead of saying A and B maybe say something like, a the last token for a top-level macro expansion must be inside a file and invert the following condition: if(!Range.getEnd().isFileID()) return; | |
461 | maybe put As and Bs in parentheses, i.e: // If the macro invocation (B) starts in a macro (A) but ends in a file, we'll // create a merged mapping (for A & B) by overwriting the endpoint for parent's (A's) // startpoint. |
clang/lib/Tooling/Syntax/Tokens.cpp | ||
---|---|---|
461 | Done, except for "parent" - the point here is there isn't really a parent/child relationship here: the arg list isn't part of the A expansion in any sense. |
clang-format-diff not found in user's PATH; not linting file.