Simplifiable statement
Reports the statements that can be simplified, such as constant conditions, identical if branches, redundant boolean expressions, and others. Use the checkboxes below to control the analysis options:
Simplify "if (true)", "while(false)": suggest replacing the
if
/while
statement with a boolean literal.Simplify "condition == true": suggest replacing equality statements with boolean literals.
Simplify "condition1 ? true : condition2;": suggest simplifying ternary operators where one of the expressions is a boolean literal.
Simplify "if (condition1) return true; return condition2;": suggest simplifying
if
where a boolean literal is returned if the condition is true and another condition is returned otherwise.
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
Simplify
Here you can find the description of settings available for the Simplifiable statement inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | CLion, 2024.3 |
Thanks for your feedback!