Checker | Guideline |
---|
| DCL52-CPP. Never qualify a reference type with const or volatile |
-Wdangling-initializer-list | EXP54-CPP. Do not access an object outside of its lifetime |
-Wdelete-incomplete | EXP57-CPP. Do not cast or delete pointers to incomplete classes |
-Wdelete-non-virtual-dtor | OOP52-CPP. Do not delete a polymorphic object without a virtual destructor |
-Wdynamic-class-memaccess | EXP60-CPP. Do not pass a nonstandard-layout type object across execution boundaries |
-Wexceptions | ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler |
-Wexceptions | ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived |
-Winvalid-noreturn | DCL57-CPP. Functions declared with [[noreturn]] must return void |
-Winvalid-noreturn | MSC55-CPP. Do not return from a function declared [[noreturn]] |
-Winvalid-offsetof | EXP59-CPP. Use offsetof() on valid types and members |
-Wmismatched-new-delete | MEM51-CPP. Properly deallocate dynamically allocated resources |
-Wreorder | OOP53-CPP. Write constructor member initializers in the canonical order |
-Wreserved-id-macro | DCL51-CPP. Do not declare or define a reserved identifier |
-Wreturn-type | MSC54-CPP. Value-returning functions must return a value from all exit paths |
-Wunevaluated-expression | EXP52-CPP. Do not rely on side effects in unevaluated operands |
-Wuninitialized | EXP53-CPP. Do not read uninitialized memory |
-Wunsequenced | EXP50-CPP. Do not depend on the order of evaluation for side effects |
-Wuser-defined-literals | DCL51-CPP. Do not declare or define a reserved identifier |
-Wvarargs | EXP58-CPP. Do not pass a reference or nontrivially copyable Pass an object of the correct type to va_start |
-Wvexing-parse | DCL53-CPP. Do not write syntactically ambiguous declarations |
-analyzer-checker=cplusplus | EXP51-CPP. Do not delete an array through a pointer of the incorrect type |
cert-dcl50-cpp | DCL50-CPP. Do not define a C-style variadic function |
cert-err52-cpp | ERR52-CPP. Do not use setjmp() or longjmp() |
cert-err58-cpp | ERR58-CPP. Constructors of objects with static or thread storage duration must not throw exceptions |
cert-err60-cpp | ERR60-CPP. Exception objects must be nothrow copy constructible |
cert-err61-cpp | ERR61-CPP. Catch exceptions by lvalue reference |
clang-analyzer-alpha.cplusplus.VirtualCall | OOP50-CPP. Do not invoke virtual functions from constructors or destructors |
clang-analyzer-alpha.security.ArrayBoundV2 | MEM50-CPP. Do not access freed memory |
clang-analyzer-core.UndefinedBinaryOperatorResult | EXP53-CPP. Do not read uninitialized memory |
clang-analyzer-cplusplus.NewDelete | MEM50-CPP. Do not access freed memory |
clang-analyzer-cplusplus.NewDeleteLeaks | MEM51-CPP. Properly deallocate dynamically allocated resources |
clang-analyzer-unix.MismatchedDeallocator | MEM51-CPP. Properly deallocate dynamically allocated resources |
google-build-namespaces | DCL59-CPP. Do not define an unnamed namespace in a header file |
misc-move-constructor-init | OOP11-CPP. Do not copy-initialize members or base classes from a move constructor |
misc-new-delete-overloads | DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope |