commit | e4b1765a0f3254038ef998cfe99efb17dc47f514 | [log] [tgz] |
---|---|---|
author | Aaron Ballman <aaron@aaronballman.com> | Thu Oct 08 19:54:43 2015 +0000 |
committer | Aaron Ballman <aaron@aaronballman.com> | Thu Oct 08 19:54:43 2015 +0000 |
tree | e192cf032005598bec81a555e941728f5323397c | |
parent | 1cbf51a41b8fa17825d8329c4c0f9779a6c056f4 [diff] [blame] |
Adding a checker (cert-err52-cpp) that detects use of setjmp or longjmp in C++ code. Corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1834 llvm-svn: 249727
diff --git a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp index d73e214..6fa984b 100644 --- a/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
@@ -15,6 +15,7 @@ #include "../misc/NewDeleteOverloadsCheck.h" #include "../misc/NonCopyableObjects.h" #include "../misc/StaticAssertCheck.h" +#include "SetLongJmpCheck.h" #include "VariadicFunctionDefCheck.h" namespace clang { @@ -35,6 +36,9 @@ // OOP CheckFactories.registerCheck<MoveConstructorInitCheck>( "cert-oop11-cpp"); + // ERR + CheckFactories.registerCheck<SetLongJmpCheck>( + "cert-err52-cpp"); // C checkers // DCL