: ("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;
// CHECK-MESSAGES: :[[@LINE+4]]:2: warning: namespace 'n2' not terminated with a closing comment [google-readability-namespace-comments]
// CHECK-MESSAGES: :[[@LINE-7]]:11: note: namespace 'n2' starts here
-// CHECK-MESSAGES: :[[@LINE+3]]:2: warning: namespace 'n1' not terminated with
+// CHECK-MESSAGES: :[[@LINE+2]]:3: warning: namespace 'n1' not terminated with
// CHECK-MESSAGES: :[[@LINE-10]]:11: note: namespace 'n1' starts here
-}
-}
+}}
// CHECK-FIXES: } // namespace n2
// CHECK-FIXES: } // namespace n1