[all-commits] [llvm/llvm-project] 8fa397: [libtooling][clang-tidy] Fix off-by-one rendering ...
Whisperity via All-commits
all-commits at lists.llvm.org
Sat Apr 10 09:53:31 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8fa39752477b225294cde0967a3b4c9c492e699c
https://github.com/llvm/llvm-project/commit/8fa39752477b225294cde0967a3b4c9c492e699c
Author: Whisperity <whisperity at gmail.com>
Date: 2021-04-10 (Sat, 10 Apr 2021)
Changed paths:
M clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
M clang-tools-extra/test/clang-tidy/infrastructure/export-diagnostics.cpp
M clang-tools-extra/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp
Log Message:
-----------
[libtooling][clang-tidy] Fix off-by-one rendering issue with SourceRanges
There was an off-by-one issue with calculating the *exact* end location
of token ranges (as given by SomeDecl->getSourceRange()) which resulted in:
xxx(something)
^~~~~~~~ // Note the missing ~ under the last character.
In addition, a test is added to keep the behaviour in check in the future.
This patch hotfixes commit 3b677b81cec7b3c5132aee8fccc30252d87deb69.
More information about the All-commits
mailing list