Skip to content

Commit 37e3bc4

Browse files
committed
C++: invoke unique without | |
Based on PR feedback. This will avoid a syntactic wart and make the invocation do the right thing both with and without `language[monotonicAggregates]`.
1 parent d433847 commit 37e3bc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Node extends TNode {
4343
/**
4444
* INTERNAL: Do not use. Alternative name for `getFunction`.
4545
*/
46-
final Function getEnclosingCallable() { result = unique( | | this.getFunction()) }
46+
final Function getEnclosingCallable() { result = unique(Function f | f = this.getFunction() | f) }
4747

4848
/** Gets the type of this node. */
4949
Type getType() { none() } // overridden in subclasses

0 commit comments

Comments
 (0)