summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-04-08 12:54:57 +0000
committerAlexander Kornienko <alexfh@google.com>2015-04-08 12:54:57 +0000
commit66d7e30b3c1ccc02232086b6d19c4350be592192 (patch)
tree4c9f3449e7ed1dbee1cdfaeb4c426e16c9c8e28d /clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
parent7c2ed44905692e33d463cfbcae0a1c6476afbb40 (diff)
downloadbcm5719-llvm-66d7e30b3c1ccc02232086b6d19c4350be592192.tar.gz
bcm5719-llvm-66d7e30b3c1ccc02232086b6d19c4350be592192.zip
[clang-tidy] Fix for http://llvm.org/PR23130
NamespaceCommentCheck: Don't remove the token placed immediately after the namespace closing brace. llvm-svn: 234403
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
index 69f456bed5d..ba3b837cbd6 100644
--- a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
@@ -129,9 +129,9 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) {
: ("namespace '" + ND->getNameAsString() + "'");
diag(AfterRBrace, Message)
- << NamespaceName
- << FixItHint::CreateReplacement(
- OldCommentRange, std::string(SpacesBeforeComments, ' ') +
+ << NamespaceName << FixItHint::CreateReplacement(
+ CharSourceRange::getCharRange(OldCommentRange),
+ std::string(SpacesBeforeComments, ' ') +
getNamespaceComment(ND, NeedLineBreak));
diag(ND->getLocation(), "%0 starts here", DiagnosticIDs::Note)
<< NamespaceName;
OpenPOWER on IntegriCloud