Skip to content

Commit f46183d

Browse files
committed
C++: Include inline namespaces in StdNamespace
1 parent 05c30e8 commit f46183d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cpp/ql/lib/semmle/code/cpp/Namespace.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,12 @@ class GlobalNamespace extends Namespace {
230230
}
231231

232232
/**
233-
* The C++ `std::` namespace.
233+
* The C++ `std::` namespace and its inline namespaces.
234234
*/
235235
class StdNamespace extends Namespace {
236-
StdNamespace() { this.hasName("std") and this.getParentNamespace() instanceof GlobalNamespace }
236+
StdNamespace() {
237+
this.hasName("std") and this.getParentNamespace() instanceof GlobalNamespace
238+
or
239+
this.isInline() and this.getParentNamespace() instanceof StdNamespace
240+
}
237241
}

0 commit comments

Comments
 (0)