summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-03-23 12:49:15 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-03-23 12:49:15 +0000
commite71037123b266a4d81a3f568d773b58e7fd91285 (patch)
tree7a5342114bdb93282e059eb61cbd367f65daa7ff /clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
parent9e925c1d66f01026883250553fe2894fa05e918b (diff)
downloadbcm5719-llvm-e71037123b266a4d81a3f568d773b58e7fd91285.tar.gz
bcm5719-llvm-e71037123b266a4d81a3f568d773b58e7fd91285.zip
Make helpers static. clang-tools edition.
Also purge dead code found by it. NFC. llvm-svn: 232948
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
index 7264f49e8bd..69f456bed5d 100644
--- a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
@@ -37,13 +37,14 @@ void NamespaceCommentCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(namespaceDecl().bind("namespace"), this);
}
-bool locationsInSameFile(const SourceManager &Sources, SourceLocation Loc1,
- SourceLocation Loc2) {
+static bool locationsInSameFile(const SourceManager &Sources,
+ SourceLocation Loc1, SourceLocation Loc2) {
return Loc1.isFileID() && Loc2.isFileID() &&
Sources.getFileID(Loc1) == Sources.getFileID(Loc2);
}
-std::string getNamespaceComment(const NamespaceDecl *ND, bool InsertLineBreak) {
+static std::string getNamespaceComment(const NamespaceDecl *ND,
+ bool InsertLineBreak) {
std::string Fix = "// namespace";
if (!ND->isAnonymousNamespace())
Fix.append(" ").append(ND->getNameAsString());
OpenPOWER on IntegriCloud