Skip to content

Commit 3b93328

Browse files
committed
C/C++ overlay: Add overlay support for discarding namespaces
1 parent dcc172a commit 3b93328

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
@@ -26,6 +26,8 @@ private string getSingleLocationFilePath(@element e) {
2626
fun_decls(e, _, _, _, loc)
2727
or
2828
type_decls(e, _, loc)
29+
or
30+
namespace_decls(e, _, loc, _)
2931
|
3032
result = getLocationFilePath(loc)
3133
)
@@ -42,6 +44,8 @@ private string getMultiLocationFilePath(@element e) {
4244
exists(@fun_decl fd | fun_decls(fd, e, _, _, loc))
4345
or
4446
exists(@type_decl td | type_decls(td, e, loc))
47+
or
48+
exists(@namespace_decl nd | namespace_decls(nd, e, loc, _))
4549
|
4650
result = getLocationFilePath(loc)
4751
)

0 commit comments

Comments
 (0)