# List of C/C++ inspections

> **TL;DR**
> `Settings | Editor | Inspections` - `C/C++`

## Data flow analysis

> **Note:**
> For more information, refer to [Data flow analysis](global-dataflow-analysis.html).

| Inspection | Description | Default Severity |
| --- | --- | --- |
| Constant condition | Analyzes method control and data flow to report conditions that are always true or false and expressions with statically constant values.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Constant function result |    Detects functions whose return value is always equal to the same constant.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Constant parameter |    Detects functions where a parameter is always equal to the same constant.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Dangling pointer |    Detects pointers that point to invalid data, typical cases are double-free and use-after-free problems. Check out this [parent ticket](https://youtrack.jetbrains.com/issue/CPP-4593) for the list of limitations.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Endless loop  |     Detects the `for`, `while`, and `goto` statements that can break only by throwing an exception.     |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Infinite recursion  |     Detects when a function produces infinite recursion.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Local value escapes scope  |     Reports the references to local values that escape the function.     |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Loop condition isn't updated inside the loop  |    Detects situations where a loop condition is not updated inside the loop, which can cause an infinite loop.     There is a similar inspection in [Clang-Tidy](clang-tidy-checks-support.html), `clang-tidy:bugprone-infinite-loop`. However, it doesn’t cover loops with exit points and throws up false positives in cases with lambdas or references. This check is disabled in CLion's [default Clang-Tidy profile](https://youtrack.jetbrains.com/articles/CPP-A-90276519/Clang-Tidy-in-CLion:-default-configuration).     |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Memory leak  |    Reports memory allocations (either the `new` operator or the `malloc()` function) that were not released before becoming unaccessible.     For more information, refer to [Inspection: Memory leak](memory-leak-analysis.html).    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Not initialized field  |  Reports the fields that may not have been initialized before usage, including the cases when initialization and usage take place in different functions.  |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Null dereference |    Detects dereferences of pointers that may contain the `nullptr`.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Unreachable calls of function |    Detects functions whose call sites are never executed.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Unreachable code |    Detects the code that is never executed (dead code).    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Unused local variable | Detects the variables that are declared but not used and never accessed for reading. |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Unused parameter | Detects the parameters that are declared but not used and never accessed for reading. |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Unused value |    Reports the cases when the value of a variable is never used after the assignment.     Clear the Warn about unused variable initializers checkbox to disable the inspection for default variable initializers (for example, if you prefer to assign `nullptr` to the variables of pointer type).     ![The Unused value inspection settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_unusedvalue_settings.png)  |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |

## Functions

| Inspection | Description | Default Severity |
| --- | --- | --- |
|  Hiding non-virtual function  |     Reports when a function hides non-virtual functions with the same signature from the base class.     |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Not implemented functions  |     Detects when a function is declared but not defined.     |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |

## General

| Inspection | Description | Default Severity |
| --- | --- | --- |
|  Argument selection defect  |     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.      For more information, refer to [Inspection: Argument selection defects](argument-selection-defects-inspection.html).    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Clangd errors and warnings  |  Reports errors and warnings from [Clangd](settings-languages-cpp-clangd.html). This inspection works in the editor as you type, and you can also get a summary of the results when [running inspections manually](running-inspections.html#run-inspections-manually) using `Code \| Inspect Code`.  |
|  Empty declaration or statement  |     Reports the redundant empty declarations and statements that can be safely removed.      |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  Inconsistent Naming  |    Reports when a symbol violates the currently selected naming convention.      Find more details in [Inspecting code for violations of the naming rules](naming-conventions.html#inconsistent-naming).    |   [Disabled](disabling-and-enabling-inspections.html)    |
|  Preprocessor directive comment  |    Finds cases where a preprocessor `#endif` comment doesn’t match the macro name.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| Unconstrained variable type | Suggests constraining local variables declared as `auto` if the result of a constrained expression or function call is assigned to them.     This inspection is disabled by default on Windows and is not supported for [concepts](c-20-concepts.html) declared with the `requires` clause syntax.     |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
|  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.      |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |

## Static Analysis Tools

| Inspection | Description | Default Severity |
| --- | --- | --- |
|  Clang-Tidy  |     Performs various clang-tidy checks related to C++ Core Guidelines, code modernization, readability, and performance issues.      For more information, refer to [Clang-Tidy integration](clang-tidy-checks-support.html).    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |
| MISRA checks |    Performs the checks defined by the [MISRA](https://misra.org.uk/) guidelines C2012 and C++2008. See [the list of currently supported checks](https://youtrack.jetbrains.com/articles/CPP-A-191430682/MISRA-checks-supported-in-CLion).     You can adjust the list of checks in the Options section:      ![MISRA checks settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_misra_settings.png)   Note that on [Windows with MSVC](quick-tutorial-on-configuring-clion-on-windows.html#MSVC) (including the case of [clang-cl](quick-tutorial-on-configuring-clion-on-windows.html#clang-cl)), CLion shows only the MISRA C++ checks. MISRA C checks can't be shown correctly because they apply to a specific language standard configurable via the `-std=cXY` flag, which is not supported by MSVC.       > **Note:** > Requires Use Clang-tidy via Clangd to be enabled in [Clangd](settings-languages-cpp-clangd.html) settings.    |   ![Warning](https://resources.jetbrains.com/help/img/idea/2026.2/warning.png) [Warning](null)   |

## See also

### Procedures

[Data flow analysis](global-dataflow-analysis.html)

