This is a small diff that adds an optional argument to the Lexer::findNextToken that allows for searching for the token while including comments (instead of having to
instantiate the lexer separately). This is a prerequisite to D133942, used to insert a statement after another statement while preserving the comments that are on the same line, which is itself a prerequisite to D133956, a new CUDA clang-tidy check
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Can you help me understand the expected use for these change?
clang/lib/Lex/Lexer.cpp | ||
---|---|---|
1278 | Drive-by change? (We don't typically use top-level const except for occasional structure members.) |
Comment Actions
Ah, thank you for the extra description, that helped a lot. The changes LGTM, though you should hold off on landing them until we're sure the clang-tidy changes are going in.
Drive-by change? (We don't typically use top-level const except for occasional structure members.)