Skip to content

Commit 8e63f2b

Browse files
committed
C/C++ overlay: discard single location elements
1 parent 2824c98 commit 8e63f2b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,38 @@ private string getSingleLocationFilePath(@element e) {
3434
macroinvocations(e, _, loc, _)
3535
or
3636
preprocdirects(e, _, loc)
37+
or
38+
diagnostics(e, _, _, _, _, loc)
39+
or
40+
usings(e, _, loc, _)
41+
or
42+
static_asserts(e, _, _, loc, _)
43+
or
44+
derivations(e, _, _, _, loc)
45+
or
46+
frienddecls(e, _, _, loc)
47+
or
48+
comments(e, _, loc)
49+
or
50+
exprs(e, _, loc)
51+
or
52+
stmts(e, _, loc)
53+
or
54+
initialisers(e, _, _, loc)
55+
or
56+
attributes(e, _, _, _, loc)
57+
or
58+
attribute_args(e, _, _, _, loc)
59+
or
60+
namequalifiers(e, _, _, loc)
61+
or
62+
enumconstants(e, _, _, _, _, loc)
63+
or
64+
type_mentions(e, _, loc, _)
65+
or
66+
lambda_capture(e, _, _, _, _, _, loc)
67+
or
68+
concept_templates(e, _, loc)
3769
|
3870
result = getLocationFilePath(loc)
3971
)

0 commit comments

Comments
 (0)