9#include "../ClangTidy.h"
10#include "../ClangTidyModule.h"
11#include "../ClangTidyModuleRegistry.h"
12#include "../bugprone/BadSignalToKillThreadCheck.h"
13#include "../bugprone/PointerArithmeticOnPolymorphicObjectCheck.h"
14#include "../bugprone/ReservedIdentifierCheck.h"
15#include "../bugprone/SignalHandlerCheck.h"
16#include "../bugprone/SignedCharMisuseCheck.h"
17#include "../bugprone/SpuriouslyWakeUpFunctionsCheck.h"
18#include "../bugprone/SuspiciousMemoryComparisonCheck.h"
19#include "../bugprone/UnhandledSelfAssignmentCheck.h"
20#include "../bugprone/UnsafeFunctionsCheck.h"
21#include "../bugprone/UnusedReturnValueCheck.h"
22#include "../concurrency/ThreadCanceltypeAsynchronousCheck.h"
23#include "../google/UnnamedNamespaceInHeaderCheck.h"
24#include "../misc/NewDeleteOverloadsCheck.h"
25#include "../misc/NonCopyableObjects.h"
26#include "../misc/StaticAssertCheck.h"
27#include "../misc/ThrowByValueCatchByReferenceCheck.h"
28#include "../performance/MoveConstructorInitCheck.h"
29#include "../readability/EnumInitialValueCheck.h"
30#include "../readability/UppercaseLiteralSuffixCheck.h"
52const llvm::StringRef CertErr33CCheckedFunctions =
"^::aligned_alloc;"
335 Opts[
"cert-dcl16-c.NewSuffixes"] =
"L;LL;LU;LLU";
336 Opts[
"cert-err33-c.CheckedFunctions"] = CertErr33CCheckedFunctions;
337 Opts[
"cert-err33-c.AllowCastToVoid"] =
"true";
338 Opts[
"cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField"] =
"false";
339 Opts[
"cert-str34-c.DiagnoseSignedUnsignedCharComparisons"] =
"false";
347static ClangTidyModuleRegistry::Add<cert::CERTModule>
349 "Adds lint checks corresponding to CERT secure coding guidelines.");
A collection of ClangTidyCheckFactory instances.
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
Finds pthread_kill function calls when thread is terminated by SIGTERM signal.
Finds pointer arithmetic performed on classes that contain a virtual function.
Checks for usages of identifiers reserved for use by the implementation.
Checker for signal handler functions.
Finds those signed char -> integer conversions which might indicate a programming error.
Finds cnd_wait, cnd_timedwait, wait, wait_for, or wait_until function calls when the function is not ...
Finds potentially incorrect calls to memcmp() based on properties of the arguments.
Finds user-defined copy assignment operators which do not protect the code against self-assignment ei...
Checks for functions that have safer, more secure replacements available, or are considered deprecate...
Detects function calls where the return value is unused.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
ClangTidyOptions getModuleOptions() override
Gets default options for checks defined in this module.
Execution of a command processor can lead to security vulnerabilities, and is generally not required.
Checks if an object of type with extended alignment is allocated by using the default operator new.
Modification of the std or posix namespace can result in undefined behavior.
This check diagnoses when the loop induction expression of a for loop has floating-point type.
Pseudorandom number generators are not genuinely random.
Finds assignments to the copied object and its direct or indirect members in copy constructors and co...
Flags use of the C standard library functions 'memset', 'memcpy' and 'memcmp' and similar derivatives...
Random number generator must be seeded properly.
Guards against use of setjmp/longjmp in C++ code.
Checks whether the constructor for a static or thread_local object will throw.
Guards against use of string conversion functions that do not have reasonable error handling for conv...
Checks whether a thrown object is nothrow copy constructible.
Guards against any C-style variadic function definitions (not declarations).
Finds pthread_setcanceltype function calls where a thread's cancellation type is set to asynchronous.
The check flags dereferences and non-pointer declarations of objects that are not meant to be passed ...
Replaces assert() with static_assert() if the condition is evaluatable at compile time.
checks for locations that do not throw by value
Enforces consistent style for enumerators' initialization, covering three styles: none,...
Detects when the integral literal or floating point literal has non-uppercase suffix,...
volatile int CERTModuleAnchorSource
Contains options for clang-tidy.
OptionMap CheckOptions
Key-value mapping used to store check-specific options.
llvm::StringMap< ClangTidyValue > OptionMap