Details
Details
- Reviewers
sammccall - Commits
- rG8c2cf499e611: [clang][Tooling] Add a way to tokenize a FileRange
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Tooling/Syntax/Tokens.cpp | ||
---|---|---|
335 | Discussed offline, this loop includes an extra token if the truncation is at whitespace between tokens. (Please test this case) Also the eof comment is confusing. I think the loop should be rewritten. | |
346 | nit: FileRange(FID, 0, SM.getFileIDSize(FID)) is a lot more direct :-) |
clang/lib/Tooling/Syntax/Tokens.cpp | ||
---|---|---|
335 | instead of re-writing the loop I just changed the after-the-loop check to verify latest lexed token to be in range. |
Discussed offline, this loop includes an extra token if the truncation is at whitespace between tokens. (Please test this case)
Also the eof comment is confusing.
I think the loop should be rewritten.