Skip to content

Commit 00d8a10

Browse files
committed
C++: Add Function.hasAmbiguousReturnType.
1 parent da7da80 commit 00d8a10

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/ql/lib/semmle/code/cpp/Function.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,14 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
524524
not exists(NewOrNewArrayExpr new | e = new.getAllocatorCall().getArgument(0))
525525
)
526526
}
527+
528+
/**
529+
* Holds if this function has ambiguous return type (this occurs sometimes in
530+
* Build Mode None).
531+
*/
532+
predicate hasAmbiguousReturnType() {
533+
count(this.getType()) != 1
534+
}
527535
}
528536

529537
pragma[noinline]

0 commit comments

Comments
 (0)