We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62ea25f commit 7912c40Copy full SHA for 7912c40
1 file changed
cpp/misra/src/rules/RULE-28-6-4/PotentiallyErroneousContainerUsage.ql
@@ -39,12 +39,7 @@ predicate isEmptyCall(FunctionCall fc) {
39
from FunctionCall fc, string message
40
where
41
not isExcluded(fc, DeadCode11Package::potentiallyErroneousContainerUsageQuery()) and
42
- exists(ExprStmt es | es.getExpr() = fc) and
43
- (
44
- isRemoveOrUniqueCall(fc) and
45
- message = "Result of call to '" + fc.getTarget().getName() + "' is not used."
46
- or
47
- isEmptyCall(fc) and
48
- message = "Result of call to 'empty' is not used."
49
- )
+ fc = any(ExprStmt es).getExpr() and
+ (isRemoveOrUniqueCall(fc) or isEmptyCall(fc)) and
+ message = "Result of call to '" + fc.getTarget().getName() + "' is not used."
50
select fc, message
0 commit comments