clang: clang::CXXBaseSpecifier Class Reference (original) (raw)
Represents a base class of a C++ class. More...
#include "[clang/AST/DeclCXX.h](DeclCXX%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| CXXBaseSpecifier ()=default | |
| CXXBaseSpecifier (SourceRange R, bool V, bool BC, AccessSpecifier A, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) | |
| SourceRange | getSourceRange () const LLVM_READONLY |
| Retrieves the source range that contains the entire base specifier. | |
| SourceLocation | getBeginLoc () const LLVM_READONLY |
| SourceLocation | getEndLoc () const LLVM_READONLY |
| SourceLocation | getBaseTypeLoc () const LLVM_READONLY |
| Get the location at which the base class type was written. | |
| bool | isVirtual () const |
| Determines whether the base class is a virtual base class (or not). | |
| bool | isBaseOfClass () const |
| Determine whether this base class is a base of a class declared with the 'class' keyword (vs. | |
| bool | isPackExpansion () const |
| Determine whether this base specifier is a pack expansion. | |
| bool | getInheritConstructors () const |
| Determine whether this base class's constructors get inherited. | |
| void | setInheritConstructors (bool Inherit=true) |
| Set that this base class's constructors should be inherited. | |
| SourceLocation | getEllipsisLoc () const |
| For a pack expansion, determine the location of the ellipsis. | |
| AccessSpecifier | getAccessSpecifier () const |
| Returns the access specifier for this base specifier. | |
| AccessSpecifier | getAccessSpecifierAsWritten () const |
| Retrieves the access specifier as written in the source code (which may mean that no access specifier was explicitly written). | |
| QualType | getType () const |
| Retrieves the type of the base class. | |
| TypeSourceInfo * | getTypeSourceInfo () const |
| Retrieves the type and source location of the base class. |
Represents a base class of a C++ class.
Each CXXBaseSpecifier represents a single, direct base class (or struct) of a C++ class (or struct). It specifies the type of that base class, whether it is a virtual or non-virtual base, and what level of access (public, protected, private) is used for the derivation. For example:
class A { };
class B { };
class C : public virtual A, protected B { };
In this code, C will have two CXXBaseSpecifiers, one for "public virtual A" and the other for "protected B".
Definition at line 146 of file DeclCXX.h.
| clang::CXXBaseSpecifier::CXXBaseSpecifier ( ) | default |
|---|
◆ CXXBaseSpecifier() [2/2]
◆ getAccessSpecifier()
| AccessSpecifier clang::CXXBaseSpecifier::getAccessSpecifier ( ) const | inline |
|---|
◆ getAccessSpecifierAsWritten()
| AccessSpecifier clang::CXXBaseSpecifier::getAccessSpecifierAsWritten ( ) const | inline |
|---|
◆ getBaseTypeLoc()
| SourceLocation clang::CXXBaseSpecifier::getBaseTypeLoc ( ) const | inline |
|---|
Get the location at which the base class type was written.
Definition at line 198 of file DeclCXX.h.
◆ getBeginLoc()
◆ getEllipsisLoc()
| SourceLocation clang::CXXBaseSpecifier::getEllipsisLoc ( ) const | inline |
|---|
◆ getEndLoc()
◆ getInheritConstructors()
| bool clang::CXXBaseSpecifier::getInheritConstructors ( ) const | inline |
|---|
Determine whether this base class's constructors get inherited.
Definition at line 213 of file DeclCXX.h.
◆ getSourceRange()
| SourceRange clang::CXXBaseSpecifier::getSourceRange ( ) const | inline |
|---|
◆ getType()
| QualType clang::CXXBaseSpecifier::getType ( ) const | inline |
|---|
Retrieves the type of the base class.
This type will always be an unqualified class type.
Definition at line 249 of file DeclCXX.h.
Referenced by clang::Sema::AttachBaseSpecifiers(), BuildImplicitBaseInitializer(), clang::Sema::BuildMemInitializer(), clang::Sema::CheckConstructorAccess(), checkMoveAssignmentForRepeatedMove(), constructAggregate(), clang::InitializationSequence::Diagnose(), clang::ODRDiagsEmitter::diagnoseMismatch(), elementwiseSize(), flattenAPValue(), clang::ento::ProgramState::getLValue(), clang::interp::Context::getOverridingFunction(), HandleConstructorCall(), clang::interp::InterpretOffsetOf(), IsStructurallyEquivalent(), clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct(), LeastDerivedClassWithSameLayout(), clang::Sema::LookupQualifiedName(), print_elem(), clang::APValue::printPretty(), and usesMultipleInheritanceModel().
◆ getTypeSourceInfo()
| TypeSourceInfo * clang::CXXBaseSpecifier::getTypeSourceInfo ( ) const | inline |
|---|
◆ isBaseOfClass()
| bool clang::CXXBaseSpecifier::isBaseOfClass ( ) const | inline |
|---|
Determine whether this base class is a base of a class declared with the 'class' keyword (vs.
one declared with the 'struct' keyword).
Definition at line 207 of file DeclCXX.h.
Referenced by clang::ASTImporter::Import().
◆ isPackExpansion()
| bool clang::CXXBaseSpecifier::isPackExpansion ( ) const | inline |
|---|
Determine whether this base specifier is a pack expansion.
Definition at line 210 of file DeclCXX.h.
◆ isVirtual()
| bool clang::CXXBaseSpecifier::isVirtual ( ) const | inline |
|---|
Determines whether the base class is a virtual base class (or not).
Definition at line 203 of file DeclCXX.h.
Referenced by clang::Sema::BuildBaseInitializer(), BuildImplicitBaseInitializer(), checkMoveAssignmentForRepeatedMove(), clang::ODRDiagsEmitter::diagnoseMismatch(), FindBaseInitializer(), clang::ento::ProgramState::getLValue(), getOffsetOfFullPath(), HandleConstructorCall(), clang::ASTImporter::Import(), clang::interp::InterpretOffsetOf(), PerformConstructorInitialization(), and clang::Sema::SpecialMemberIsTrivial().
◆ setInheritConstructors()
| void clang::CXXBaseSpecifier::setInheritConstructors ( bool Inherit = true) | inline |
|---|
Set that this base class's constructors should be inherited.
Definition at line 216 of file DeclCXX.h.
The documentation for this class was generated from the following file:
- include/clang/AST/DeclCXX.h