List of C/C++ inspections
Data flow analysis
|Constant conditions||Analyzes method control and data flow to report conditions that are always true or false and expressions with statically constant values.||Warning|
Detects when a function produces infinite recursion.
|Local value escapes scope|
Detects variables that reference local values that escape their scope.
Reports when a non-void function doesn't have a
|Not initialized variable|
Detects the local variables that haven't been initialized before usage.
|Null dereferences||Detects dereferences of pointers that may contain the ||Warning|
|Unreachable code||Detects the code that is never executed (dead code).||Warning|
|Unused local variable||Detects the variables that are declared but not used and never accessed for reading.||Warning|
|Unused parameter||Detects the parameters that are declared but not used and never accessed for reading.||Warning|
|Unused value||Reports the cases when the value of a variable is never used after the assignment.||Warning|
|Function implicit declaration|
Reports when a function is used prior to being declared.
|Hides upper scope|
Reports local variables declared in the scope of other local variables or parameters with the same name.
|Hiding non-virtual function|
Reports when a function hides non-virtual functions with the same signature from the base class.
|Not implemented functions|
Detects when a function is declared but not defined.
|Passing arguments to function with K&R unspecified parameters syntax|
Reports when a function with the K&R parameters syntax uses a non-empty argument list.
|Argument selection defects|
Compares the names of arguments in a call and formal parameter names in the declaration to detect the errors like accidental switching of the arguments.
See Argument Selection Defects Inspection for details.
Performs various clang-tidy checks related to C++ Core Guidelines, code modernization, readability, and performance issues.
See Clang-Tidy Checks Support for details.
|Constrain a function's result||Suggests constraining local variables if they are assigned to/from a constrained function call.||Warning|
|Duplicate switch case|
|Empty declaration or statement|
Reports the redundant empty declarations and statements that can be safely removed.
Detects when a call to a string format function (such as
|'=' in conditional expression|
Detects when the
Reports when a symbol violates the currently selected naming convention.
Find more details in Inspecting code for violations of the naming rules.
|Missing switch case|
Reports when a
|Resource not found|
Reports unresolved references to resources like NIBs, images, and others.
Finds code parts that can be simplified. For example, constant conditions, identical
|Usage of deprecated API|
Detects the usages of deprecated code in the specified scope.
|Virtual call from constructor or destructor|
Reports when a virtual function is called from a constructor or destructor, helping to prevent situations when virtual functions access the resources that are not yet initialized or have already been destroyed.
|Implicit integer and enum conversion|
Detects when a num type expression is used in the context of an integer or pointer type, and vice versa.
|Implicit pointer and integer conversion|
Detects when an integer type expression is used in the context of a pointer type, and vice versa.
Reports the cases when an expression of the enum type A is used in the context of another enum type B (assigned, casted, used in a parameter, returned from a method, function or a block, and so on).
Reports the cases when a variable initializer doesn't match the declared type. For example, when there are too many initializers for an array or structure.
Reports when an expression of a pointer type A is used in the context of another pointer type B (assigned, casted, used in a parameter, returned from a method, function or a block, and so on).
This inspection doesn't check class type pointers.
Reports when an expression of type A is used in the context of type B, whereas A and B are class types, and B is not a superclass of A.
Reports unnecessary type cast expressions.
Reports when an expression of a signed type is used in the context of an unsigned type (assigned, casted, used in a parameter, returned from a method, function or a block, and so on).
|Value may not fit into receiver|
Reports when an expression of type A is used in the context of type B, while the range of values in type B is not large enough to store all possible values of type A.
Detects C++ concepts that are never used.
|Unused expression result|
Reports the expressions whose results are never used.
|Unused global declaration|
Detects when a global function or variable is declared but never accessed or written.
|Unused include directive|
Reports the unused or unrequired
See Unused Include Directive Inspection for details.
Detects macro definitions that are never used in the code.
Detects C/C++ classes and structures that are never used.
|Unused template parameter|
Detects C++ class and function template parameters that are never used.