We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 45a3dcd + 3700a63 commit 1bd0c69Copy full SHA for 1bd0c69
cpp/ql/src/semmle/code/cpp/internal/ResolveClass.qll
@@ -14,7 +14,12 @@ pragma[noinline]
14
private predicate existsCompleteWithName(string name, @usertype d) {
15
is_complete(d) and
16
name = getTopLevelClassName(d) and
17
- strictcount(@usertype other | is_complete(other) and getTopLevelClassName(other) = name) = 1
+ onlyOneCompleteClassExistsWithName(name)
18
+}
19
+
20
+pragma[noinline]
21
+private predicate onlyOneCompleteClassExistsWithName(string name) {
22
+ strictcount(@usertype c | is_complete(c) and getTopLevelClassName(c) = name) = 1
23
}
24
25
/** Holds if `c` is an incomplete class named `name`. */
0 commit comments