Skip to content

Commit 1a830cd

Browse files
committed
C++: Do not generate IR for functions with multiple entry points in different locations
1 parent 8cfd19c commit 1a830cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ private predicate isInvalidFunction(Function func) {
196196
expr.getEnclosingFunction() = func and
197197
not exists(expr.getType())
198198
)
199+
or
200+
count(func.getEntryPoint().getLocation()) > 1
199201
}
200202

201203
/**

0 commit comments

Comments
 (0)