summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/cert
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2016-01-04 14:31:14 +0000
committerAaron Ballman <aaron@aaronballman.com>2016-01-04 14:31:14 +0000
commit1284f04aedab5153be92c3f828be01af241eef1d (patch)
treeca3c410eb6a0a370e83a05b15e88cc4e1ba37171 /clang-tools-extra/clang-tidy/cert
parent5f4f496fcf92d72e567270d22a4e556e34233247 (diff)
downloadbcm5719-llvm-1284f04aedab5153be92c3f828be01af241eef1d.tar.gz
bcm5719-llvm-1284f04aedab5153be92c3f828be01af241eef1d.zip
Rename the CERT namespace to cert, and update some checkers to use this namespace consistently.
Patch thanks to Haojian Wu! llvm-svn: 256756
Diffstat (limited to 'clang-tools-extra/clang-tidy/cert')
-rw-r--r--clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h3
-rw-r--r--clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp3
-rw-r--r--clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h3
-rw-r--r--clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h3
-rw-r--r--clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp3
-rw-r--r--clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h3
9 files changed, 20 insertions, 10 deletions
diff --git a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
index 05d6480f7a3..4e0a6ed24d5 100644
--- a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
@@ -23,7 +23,7 @@
namespace clang {
namespace tidy {
-namespace CERT {
+namespace cert {
class CERTModule : public ClangTidyModule {
public:
@@ -60,10 +60,10 @@ public:
}
};
-} // namespace misc
+} // namespace cert
// Register the MiscTidyModule using this statically initialized variable.
-static ClangTidyModuleRegistry::Add<CERT::CERTModule>
+static ClangTidyModuleRegistry::Add<cert::CERTModule>
X("cert-module",
"Adds lint checks corresponding to CERT secure coding guidelines.");
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
index bc5b35341f2..89ba5e77d06 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
@@ -18,6 +18,7 @@ using namespace clang::ast_matchers;
namespace clang {
namespace tidy {
+namespace cert {
const char SetLongJmpCheck::DiagWording[] =
"do not call %0; consider using exception handling instead";
@@ -73,5 +74,6 @@ void SetLongJmpCheck::check(const MatchFinder::MatchResult &Result) {
diag(E->getExprLoc(), DiagWording) << cast<NamedDecl>(E->getCalleeDecl());
}
+} // namespace cert
} // namespace tidy
} // namespace clang
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
index 17fa11056c5..1d6c0981bd7 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
@@ -14,6 +14,7 @@
namespace clang {
namespace tidy {
+namespace cert {
/// Guards against use of setjmp/longjmp in C++ code
///
@@ -30,8 +31,8 @@ public:
static const char DiagWording[];
};
+} // namespace cert
} // namespace tidy
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
-
diff --git a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
index 4954fe30c02..53597fae25c 100644
--- a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
namespace clang {
namespace tidy {
+namespace cert {
void StaticObjectExceptionCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().CPlusPlus)
@@ -44,6 +45,6 @@ void StaticObjectExceptionCheck::check(const MatchFinder::MatchResult &Result) {
DiagnosticIDs::Note);
}
+} // namespace cert
} // namespace tidy
} // namespace clang
-
diff --git a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
index 14dfb08a9a8..463f4336555 100644
--- a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
@@ -14,6 +14,7 @@
namespace clang {
namespace tidy {
+namespace cert {
/// Checks whether the constructor for a static or thread_local object will
/// throw.
@@ -28,8 +29,8 @@ public:
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
+} // namespace cert
} // namespace tidy
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_ERR58_CPP_H
-
diff --git a/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.cpp b/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.cpp
index f569789d425..c9c5f3eee57 100644
--- a/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.cpp
@@ -16,6 +16,8 @@ using namespace clang::ast_matchers;
namespace clang {
namespace tidy {
+namespace cert {
+
void ThrownExceptionTypeCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().CPlusPlus)
return;
@@ -34,6 +36,6 @@ void ThrownExceptionTypeCheck::check(const MatchFinder::MatchResult &Result) {
"thrown exception type is not nothrow copy constructible");
}
+} // namespace cert
} // namespace tidy
} // namespace clang
-
diff --git a/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h b/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
index 0b1d5f31eef..e05539efb13 100644
--- a/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
@@ -14,6 +14,7 @@
namespace clang {
namespace tidy {
+namespace cert {
/// Checks whether a thrown object is nothrow copy constructible.
///
@@ -27,8 +28,8 @@ public:
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
+} // namespace cert
} // namespace tidy
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_THROWNEXCEPTIONTYPECHECK_H
-
diff --git a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp
index a5f8fa7e733..ea6112a6d8d 100644
--- a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
namespace clang {
namespace tidy {
+namespace cert {
void VariadicFunctionDefCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().CPlusPlus)
@@ -36,6 +37,6 @@ void VariadicFunctionDefCheck::check(const MatchFinder::MatchResult &Result) {
"parameter pack or currying instead");
}
+} // namespace cert
} // namespace tidy
} // namespace clang
-
diff --git a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
index 746306314ac..e215e8df83c 100644
--- a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
@@ -14,6 +14,7 @@
namespace clang {
namespace tidy {
+namespace cert {
/// Guards against any C-style variadic function definitions (not declarations).
///
@@ -27,8 +28,8 @@ public:
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
+} // namespace cert
} // namespace tidy
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_VARIADICFUNCTIONDEF_H
-
OpenPOWER on IntegriCloud