diff options
| author | Artem Dergachev <artem.dergachev@gmail.com> | 2019-04-23 21:15:26 +0000 |
|---|---|---|
| committer | Artem Dergachev <artem.dergachev@gmail.com> | 2019-04-23 21:15:26 +0000 |
| commit | 8c099ce72d480fbff943613c7482992449fafe2d (patch) | |
| tree | 8267c823a4c59b202a1fba84bf73bd4b39c764f5 /clang-tools-extra/clang-tidy/modernize | |
| parent | fc79ab9857adc96d243cc5ed0a641eef8ef3f253 (diff) | |
| download | bcm5719-llvm-8c099ce72d480fbff943613c7482992449fafe2d.tar.gz bcm5719-llvm-8c099ce72d480fbff943613c7482992449fafe2d.zip | |
Re-apply r357823 "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()."
It now comes with a follow-up fix for the clients of this API
in clangd and clang-tidy.
Differential Revision: https://reviews.llvm.org/D59977
llvm-svn: 359035
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize')
| -rw-r--r-- | clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp b/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp index 33ac85610d2..c1539bfd1d2 100644 --- a/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp @@ -39,6 +39,7 @@ static bool alreadyConcatenated(std::size_t NumCandidates, const SourceRange &ReplacementRange, const SourceManager &Sources, const LangOptions &LangOpts) { + // FIXME: This logic breaks when there is a comment with ':'s in the middle. CharSourceRange TextRange = Lexer::getAsCharRange(ReplacementRange, Sources, LangOpts); StringRef CurrentNamespacesText = |

