From e71037123b266a4d81a3f568d773b58e7fd91285 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 23 Mar 2015 12:49:15 +0000 Subject: Make helpers static. clang-tools edition. Also purge dead code found by it. NFC. llvm-svn: 232948 --- clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp') 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()); -- cgit v1.2.3