8000 C++: Filter out instructions with incomplete SSA in range analysis. · github/codeql@9d2eb3d · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d2eb3d

Browse files
committed
C++: Filter out instructions with incomplete SSA in range analysis.
1 parent 510df38 commit 9d2eb3d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/SemanticExprSpecific.qll

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,14 @@ module SemanticExprConfig {
112112
}
113113

114114
/** Holds if no range analysis should be performed on the phi edges in `f`. */
115-
private predicate excludeFunction(Cpp::Function f) { count(f.getEntryPoint()) > 1 }
115+
private predicate excludeFunction(Cpp::Function f) {
116+
count(f.getEntryPoint()) > 1
117+
or
118+
exists(IR::IRFunction irFunction |
119+
irFunction.getFunction() = f and
120+
irFunction.hasIncompleteSsa()
121+
)
122+
}
116123

117124
SemType getUnknownExprType(Expr expr) { result = getSemanticType(expr.getResultIRType()) }
118125

0 comm 31AC it comments

Comments
 (0)
0