[clang-tools-extra] r230946 - [clang-tidy] Refactor: Move readability checks to namespace clang::tidy::readability
Alexander Kornienko
alexfh at google.com
Mon Mar 2 03:43:01 PST 2015
Author: alexfh
Date: Mon Mar 2 05:43:00 2015
New Revision: 230946
URL: http://llvm.org/viewvc/llvm-project?rev=230946&view=rev
Log:
[clang-tidy] Refactor: Move readability checks to namespace clang::tidy::readability
clang-tidy checks are organized into modules. This refactoring moves the
readability module checks into the namespace clang::tidy::readability
http://reviews.llvm.org/D7997
Patch by Richard Thomson!
Modified:
clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.cpp
clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.h
clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.cpp
clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.h
Modified: clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.cpp?rev=230946&r1=230945&r2=230946&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.cpp Mon Mar 2 05:43:00 2015
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
namespace clang {
namespace tidy {
+namespace readability {
void ElseAfterReturnCheck::registerMatchers(MatchFinder *Finder) {
// FIXME: Support continue, break and throw.
@@ -41,6 +42,6 @@ void ElseAfterReturnCheck::check(const M
Diag << removeToken(CS->getLBracLoc()) << removeToken(CS->getRBracLoc());
}
+} // namespace readability
} // namespace tidy
} // namespace clang
-
Modified: clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.h?rev=230946&r1=230945&r2=230946&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ElseAfterReturnCheck.h Mon Mar 2 05:43:00 2015
@@ -14,6 +14,7 @@
namespace clang {
namespace tidy {
+namespace readability {
class ElseAfterReturnCheck : public ClangTidyCheck {
public:
@@ -23,8 +24,8 @@ public:
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
+} // namespace readability
} // namespace tidy
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_ELSE_AFTER_RETURN_H
-
Modified: clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.cpp?rev=230946&r1=230945&r2=230946&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.cpp Mon Mar 2 05:43:00 2015
@@ -39,6 +39,7 @@ AST_MATCHER(NamedDecl, stlShrinkableCont
namespace clang {
namespace tidy {
+namespace readability {
void ShrinkToFitCheck::registerMatchers(MatchFinder *Finder) {
// Swap as a function need not to be considered, because rvalue can not
@@ -104,5 +105,6 @@ void ShrinkToFitCheck::check(const Match
<< Hint;
}
+} // namespace readability
} // namespace tidy
} // namespace clang
Modified: clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.h?rev=230946&r1=230945&r2=230946&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ShrinkToFitCheck.h Mon Mar 2 05:43:00 2015
@@ -14,6 +14,7 @@
namespace clang {
namespace tidy {
+namespace readability {
/// \brief Replace copy and swap tricks on shrinkable containers with the
/// \c shrink_to_fit() method call.
@@ -29,6 +30,7 @@ public:
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
+} // namespace readability
} // namespace tidy
} // namespace clang
More information about the cfe-commits
mailing list