clang 23.0.0git
clang::ssaf::NestedBuildNamespace Class Reference

Represents a hierarchical sequence of build namespaces. More...

#include "clang/ScalableStaticAnalysisFramework/Core/Model/BuildNamespace.h"

Public Member Functions

 NestedBuildNamespace ()=default
 NestedBuildNamespace (const std::vector< BuildNamespace > &Namespaces)
 NestedBuildNamespace (const BuildNamespace &N)
NestedBuildNamespace makeQualified (NestedBuildNamespace Namespace) const
 Creates a new NestedBuildNamespace by appending additional namespace.
bool empty () const
bool operator== (const NestedBuildNamespace &Other) const
bool operator!= (const NestedBuildNamespace &Other) const
bool operator< (const NestedBuildNamespace &Other) const

Static Public Member Functions

static NestedBuildNamespace makeCompilationUnit (llvm::StringRef CompilationId)
 Creates a NestedBuildNamespace representing a compilation unit.

Friends

class SerializationFormat
class TestFixture
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const NestedBuildNamespace &NBN)

Detailed Description

Represents a hierarchical sequence of build namespaces.

A NestedBuildNamespace captures namespace qualification for program entities by maintaining an ordered sequence of BuildNamespace steps. This models how entities are organized through multiple steps of the build process, such as first being part of a compilation unit, then incorporated into a link unit.

For example, an entity might be qualified by a compilation unit namespace followed by a shared library namespace.

Definition at line 78 of file BuildNamespace.h.

Constructor & Destructor Documentation

◆ NestedBuildNamespace() [1/3]

clang::ssaf::NestedBuildNamespace::NestedBuildNamespace ( )
default

◆ NestedBuildNamespace() [2/3]

clang::ssaf::NestedBuildNamespace::NestedBuildNamespace ( const std::vector< BuildNamespace > & Namespaces)
inlineexplicit

Definition at line 84 of file BuildNamespace.h.

◆ NestedBuildNamespace() [3/3]

clang::ssaf::NestedBuildNamespace::NestedBuildNamespace ( const BuildNamespace & N)
inlineexplicit

Definition at line 87 of file BuildNamespace.h.

Member Function Documentation

◆ empty()

bool clang::ssaf::NestedBuildNamespace::empty ( ) const

Definition at line 43 of file BuildNamespace.cpp.

◆ makeCompilationUnit()

NestedBuildNamespace clang::ssaf::NestedBuildNamespace::makeCompilationUnit ( llvm::StringRef CompilationId)
static

Creates a NestedBuildNamespace representing a compilation unit.

Parameters
CompilationIdThe unique identifier for the compilation unit.
Returns
A NestedBuildNamespace containing a single CompilationUnit BuildNamespace.

Definition at line 36 of file BuildNamespace.cpp.

References clang::ssaf::BuildNamespace::makeCompilationUnit(), NestedBuildNamespace(), and clang::Result.

◆ makeQualified()

NestedBuildNamespace clang::ssaf::NestedBuildNamespace::makeQualified ( NestedBuildNamespace Namespace) const
inline

Creates a new NestedBuildNamespace by appending additional namespace.

Parameters
NamespaceThe namespace to append.

Definition at line 102 of file BuildNamespace.h.

References clang::Copy, and NestedBuildNamespace().

Referenced by resolveNamespace().

◆ operator!=()

bool clang::ssaf::NestedBuildNamespace::operator!= ( const NestedBuildNamespace & Other) const

Definition at line 49 of file BuildNamespace.cpp.

References NestedBuildNamespace(), and clang::Other.

◆ operator<()

bool clang::ssaf::NestedBuildNamespace::operator< ( const NestedBuildNamespace & Other) const

Definition at line 53 of file BuildNamespace.cpp.

References NestedBuildNamespace(), and clang::Other.

◆ operator==()

bool clang::ssaf::NestedBuildNamespace::operator== ( const NestedBuildNamespace & Other) const

Definition at line 45 of file BuildNamespace.cpp.

References NestedBuildNamespace(), and clang::Other.

◆ operator<<

llvm::raw_ostream & operator<< ( llvm::raw_ostream & OS,
const NestedBuildNamespace & NBN )
friend

Definition at line 65 of file BuildNamespace.cpp.

References NestedBuildNamespace().

◆ SerializationFormat

friend class SerializationFormat
friend

Definition at line 116 of file BuildNamespace.h.

References SerializationFormat.

Referenced by SerializationFormat.

◆ TestFixture

friend class TestFixture
friend

Definition at line 117 of file BuildNamespace.h.

References NestedBuildNamespace(), and TestFixture.

Referenced by TestFixture.


The documentation for this class was generated from the following files: