Skip to content

Commit 2103c1b

Browse files
committed
C/C++ overlay: Add overlay support for discarding user types
1 parent 3f22440 commit 2103c1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ private string getSingleLocationFilePath(@element e) {
2424
var_decls(e, _, _, _, loc)
2525
or
2626
fun_decls(e, _, _, _, loc)
27+
or
28+
type_decls(e, _, loc)
2729
|
2830
result = getLocationFilePath(loc)
2931
)
@@ -38,6 +40,8 @@ private string getMultiLocationFilePath(@element e) {
3840
exists(@var_decl vd | var_decls(vd, e, _, _, loc))
3941
or
4042
exists(@fun_decl fd | fun_decls(fd, e, _, _, loc))
43+
or
44+
exists(@type_decl td | type_decls(td, e, loc))
4145
|
4246
result = getLocationFilePath(loc)
4347
)

0 commit comments

Comments
 (0)