From c34456e3a04e53c5822655d5347222ffa97cc352 Mon Sep 17 00:00:00 2001 From: idrissrio Date: Mon, 8 Dec 2025 16:08:56 +0100 Subject: [PATCH] C/C++ overlay: Add overlay support for discarding user types --- 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 adc040c5cff..61466946070 100644 --- a/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll +++ b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll @@ -24,6 +24,8 @@ private string getSingleLocationFilePath(@element e) { var_decls(e, _, _, _, loc) or fun_decls(e, _, _, _, loc) + or + type_decls(e, _, loc) | result = getLocationFilePath(loc) ) @@ -38,6 +40,8 @@ private string getMultiLocationFilePath(@element e) { exists(@var_decl vd | var_decls(vd, e, _, _, loc)) or exists(@fun_decl fd | fun_decls(fd, e, _, _, loc)) + or + exists(@type_decl td | type_decls(td, e, loc)) | result = getLocationFilePath(loc) )