Skip to content

Commit 6b2c415

Browse files
committed
Exclude compiler generated elements or elements from uninstantiated templates
1 parent 7c7d0ac commit 6b2c415

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpp/common/src/codingstandards/cpp/Exclusions.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ predicate isExcluded(Element e, Query query) { isExcluded(e, query, _) }
1919

2020
bindingset[e, query]
2121
predicate isExcluded(Element e, Query query, string reason) {
22+
e.isFromUninstantiatedTemplate(_) and reason = "Element is from an uninstantiated template."
23+
or
24+
e.(Variable).isCompilerGenerated() and reason = "Element is compiler generated."
25+
or
26+
e.(Function).isCompilerGenerated() and reason = "Element is compiler generated."
27+
or
2228
e instanceof ExcludedElement and reason = "Element is an excluded element."
2329
or
2430
e.getFile() instanceof ExcludedFile and reason = "Element is part of an excluded file."

0 commit comments

Comments
 (0)