Used in clangd for a code tweak that expands a macro.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang/include/clang/Tooling/Syntax/Tokens.h | ||
---|---|---|
204 ↗ | (On Diff #203356) | macro directives -> preprocessor directives? |
207 ↗ | (On Diff #203356) | nit: "pragma" |
207 ↗ | (On Diff #203356) | these would be clearer without repeating the text, e.g. "Expands to an empty range" |
209 ↗ | (On Diff #203356) | also mention #include? |
214 ↗ | (On Diff #203356) | maybe mention # as it's the other common case |
216 ↗ | (On Diff #203356) | 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 |
Comment Actions
- Address comments.
- s/findExpansion/expansionStartingAt.
- Add tests.
clang/include/clang/Tooling/Syntax/Tokens.h | ||
---|---|---|
209 ↗ | (On Diff #203356) | Added an example and a FIXME mentioning this does not work yet. |
clang/lib/Tooling/Syntax/Tokens.cpp | ||
---|---|---|
207 ↗ | (On Diff #205352) | This assert could use a message |