CodeQL library for C/C++
codeql/cpp-all 2.0.1-dev (changelog, source)
Search

Module Namespace

Provides classes for modeling namespaces, using directives and using declarations.

Import path

import semmle.code.cpp.Namespace

Imports

Element

Provides the Element class, which is the base class for all classes representing C or C++ program elements.

MetricNamespace
Type

Provides a hierarchy of classes for modeling C/C++ types.

Classes

GlobalNamespace

The C/C++ global namespace.

Namespace

A C++ namespace. For example the (single) namespace A in the following code:

NamespaceDeclarationEntry

A declaration of (part of) a C++ namespace. This corresponds to a single namespace N { ... } occurrence in the source code. For example the two mentions of A in the following code:

StdNamespace

The C++ std:: namespace and its inline namespaces.

UsingDeclarationEntry

A C++ using declaration. For example: using std::string;

UsingDirectiveEntry

A C++ using directive. For example: using namespace std;

UsingEntry

A C++ using directive or using declaration.

UsingEnumDeclarationEntry

A C++ using enum declaration. For example: enum class Foo { a, b }; using enum Foo;