Used in clangd for a code tweak that expands a macro.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 33566 Build 33565: arc lint + arc unit
Event Timeline
clang/include/clang/Tooling/Syntax/Tokens.h | ||
---|---|---|
204 | macro directives -> preprocessor directives? | |
207 | nit: "pragma" | |
207 | these would be clearer without repeating the text, e.g. "Expands to an empty range" | |
209 | also mention #include? | |
214 | maybe mention # as it's the other common case | |
216 | I think expansionStartingAt would be a clearer name. Given the current name, I would expect to be able to pass any of the tokens within the spelled range |
- Address comments.
- s/findExpansion/expansionStartingAt.
- Add tests.
clang/include/clang/Tooling/Syntax/Tokens.h | ||
---|---|---|
209 | Added an example and a FIXME mentioning this does not work yet. |
clang/lib/Tooling/Syntax/Tokens.cpp | ||
---|---|---|
207 | This assert could use a message |
macro directives -> preprocessor directives?