Skip to content

Commit fc39df2

Browse files
committed
C++: Don't generate dataflow nodes for instructions inside summarized callables.
1 parent ccb28ed commit fc39df2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ predicate ignoreInstruction(Instruction instr) {
4141
instr instanceof AliasedUseInstruction or
4242
instr instanceof InitializeNonLocalInstruction or
4343
instr instanceof ReturnIndirectionInstruction or
44-
instr instanceof UninitializedGroupInstruction
44+
instr instanceof UninitializedGroupInstruction or
45+
// We exclude instruction belonging to functions that have a summary.
46+
instr.getEnclosingFunction() = any(SummarizedCallable sc).getUnderlyingCallable()
4547
)
4648
}
4749

0 commit comments

Comments
 (0)