From 7b7f5caa6d17269c30054528a5d4d14775f8dd79 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 2 Nov 2016 14:16:36 +0000 Subject: Add a new clang-tidy check for cert-msc50-cpp (and cert-msc30-c) that corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/MSC50-CPP.+Do+not+use+std%3A%3Arand%28%29+for+generating+pseudorandom+numbers Patch by Benedek Kiss git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@285809 91177308-0d34-0410-b5e6-96231b3b80d8 --- clang-tidy/cert/CERTTidyModule.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang-tidy/cert/CERTTidyModule.cpp') diff --git a/clang-tidy/cert/CERTTidyModule.cpp b/clang-tidy/cert/CERTTidyModule.cpp index c44d6eeb..71135378 100644 --- a/clang-tidy/cert/CERTTidyModule.cpp +++ b/clang-tidy/cert/CERTTidyModule.cpp @@ -18,6 +18,7 @@ #include "../misc/ThrowByValueCatchByReferenceCheck.h" #include "CommandProcessorCheck.h" #include "FloatLoopCounter.h" +#include "LimitedRandomnessCheck.h" #include "SetLongJmpCheck.h" #include "StaticObjectExceptionCheck.h" #include "StrToNumCheck.h" @@ -53,6 +54,9 @@ public: "cert-err60-cpp"); CheckFactories.registerCheck( "cert-err61-cpp"); + // MSC + CheckFactories.registerCheck( + "cert-msc50-cpp"); // C checkers // DCL @@ -70,6 +74,9 @@ public: // ERR CheckFactories.registerCheck( "cert-err34-c"); + // MSC + CheckFactories.registerCheck( + "cert-msc30-c"); } ClangTidyOptions getModuleOptions() override { ClangTidyOptions Options; -- cgit v1.2.3