This revision was automatically updated to reflect the committed changes.
Closed by commit rL363698: [Syntax] Add a helper to find expansion by its first
spelled token (authored by ibiryukov, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to c
ilya-biryukov updated this revision to Diff 205374.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Added a message to the assertion
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62954/new/
https://reviews.llvm.org/
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:207
+ auto FileIt = Files.find(SourceMgr->getFileID(Spelled->location()));
+ assert(FileIt != Files.end());
+
ilya-biryukov added inline comments.
Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:209
+ ///#define FOO 1 2 3 // Expansion from "#define FOO 1" to an empty range.
+ ///FOO // Expansion from "FOO" to "1 2 3".
+ struct Expansion {
ilya-biryukov updated this revision to Diff 205352.
ilya-biryukov marked 7 inline comments as done.
ilya-biryukov added a comment.
- Address comments.
- s/findExpansion/expansionStartingAt.
- Add tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D
sammccall added a comment.
LG but needs tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62954/new/
https://reviews.llvm.org/D62954
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
sammccall added inline comments.
Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:204
+ /// An expansion produced by the preprocessor, includes macro expansions and
+ /// macro directives. Preprocessor always maps a non-empty range of spelled
+ /// tokens to a (possibly
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added a subscriber: kadircet.
Herald added a project: clang.
Used in clangd for a code tweak that expands a macro.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62954
Files:
clang/include