Skip to content

Commit 63a60b1

Browse files
committed
Scope: Address performance issues with excludedViaNestedNamespace
Add pragma_inline to ensure we consider this as a post-filtering step.
1 parent 1f8e2ba commit 63a60b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/common/src/codingstandards/cpp/Scope.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ predicate hasBlockScope(Declaration decl) { exists(BlockStmt b | b.getADeclarati
269269
/**
270270
* identifiers in nested (named/nonglobal) namespaces are exceptions to hiding due to being able access via fully qualified ids
271271
*/
272+
bindingset[outerDecl, innerDecl]
273+
pragma[inline_late]
272274
predicate excludedViaNestedNamespaces(UserVariable outerDecl, UserVariable innerDecl) {
273275
exists(Namespace inner, Namespace outer |
274276
outer.getAChildNamespace+() = inner and

0 commit comments

Comments
 (0)