Details
-
Type:
New Feature
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: Rules to specify, Subject: Symbolic execution, Importance: Relevant, Level: Hard
-
Component/s: C, C++, Objective-C, Rules, Symbolic Execution
-
Labels:
Description
Report cases of redundant conditions (condition subexpressions that are trivially true or false). Examples:
unsigned a = ...; unsigned b = ...; unsigned c = ...; if (a < 10 && a < 100) ... if (10 < a || 100 < a) ... // first inequality is redundant if (a < 10 && true) ... if (a < b && b < c && a < c) ... // last inequality is redundant
Generalizes S1125