From f46183d0ba5486d7a9b797d55d3b8721be60afa2 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Mon, 22 May 2023 11:41:49 +0200 Subject: [PATCH] C++: Include inline namespaces in `StdNamespace` --- cpp/ql/lib/semmle/code/cpp/Namespace.qll | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Namespace.qll b/cpp/ql/lib/semmle/code/cpp/Namespace.qll index 129e1449c32..065e28c8429 100644 --- a/cpp/ql/lib/semmle/code/cpp/Namespace.qll +++ b/cpp/ql/lib/semmle/code/cpp/Namespace.qll @@ -230,8 +230,12 @@ class GlobalNamespace extends Namespace { } /** - * The C++ `std::` namespace. + * The C++ `std::` namespace and its inline namespaces. */ class StdNamespace extends Namespace { - StdNamespace() { this.hasName("std") and this.getParentNamespace() instanceof GlobalNamespace } + StdNamespace() { + this.hasName("std") and this.getParentNamespace() instanceof GlobalNamespace + or + this.isInline() and this.getParentNamespace() instanceof StdNamespace + } }