When there are comments in the line, one token may be checked multiple times.
Details
Details
- Reviewers
djasper mprobst - Commits
- rG89be04720148: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.
rC266803: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.
rL266803: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Can you add a test?
lib/Format/TokenAnnotator.h | ||
---|---|---|
143 ↗ | (On Diff #53689) | It's a bit subtle that this works even if Tok is nullptr at this point. Maybe change to return Tok && startsWithInternal( ... to make this more clear. |