From 1286ca6683a39e83fcb2f5f117bf4c93134b2511 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 8 Dec 2025 16:09:26 +0100 Subject: [PATCH] C/C++ overlay: Add overlay support for discarding namespaces --- cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll index 61466946070..9bc9ace89fe 100644 --- a/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll +++ b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll @@ -26,6 +26,8 @@ private string getSingleLocationFilePath(@element e) { fun_decls(e, _, _, _, loc) or type_decls(e, _, loc) + or + namespace_decls(e, _, loc, _) | result = getLocationFilePath(loc) ) @@ -42,6 +44,8 @@ private string getMultiLocationFilePath(@element e) { exists(@fun_decl fd | fun_decls(fd, e, _, _, loc)) or exists(@type_decl td | type_decls(td, e, loc)) + or + exists(@namespace_decl nd | namespace_decls(nd, e, loc, _)) | result = getLocationFilePath(loc) )