clang
6.0.0
|
Represents a base class of a C++ class. More...
#include "clang/AST/DeclCXX.h"
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. More... | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
SourceLocation | getBaseTypeLoc () const LLVM_READONLY |
Get the location at which the base class type was written. More... | |
bool | isVirtual () const |
Determines whether the base class is a virtual base class (or not). More... | |
bool | isBaseOfClass () const |
Determine whether this base class is a base of a class declared with the 'class' keyword (vs. More... | |
bool | isPackExpansion () const |
Determine whether this base specifier is a pack expansion. More... | |
bool | getInheritConstructors () const |
Determine whether this base class's constructors get inherited. More... | |
void | setInheritConstructors (bool Inherit=true) |
Set that this base class's constructors should be inherited. More... | |
SourceLocation | getEllipsisLoc () const |
For a pack expansion, determine the location of the ellipsis. More... | |
AccessSpecifier | getAccessSpecifier () const |
Returns the access specifier for this base specifier. More... | |
AccessSpecifier | getAccessSpecifierAsWritten () const |
Retrieves the access specifier as written in the source code (which may mean that no access specifier was explicitly written). More... | |
QualType | getType () const |
Retrieves the type of the base class. More... | |
TypeSourceInfo * | getTypeSourceInfo () const |
Retrieves the type and source location of the base class. More... | |
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:
In this code, C will have two CXXBaseSpecifiers, one for "public virtual A" and the other for "protected B".
|
default |
|
inline |
|
inline |
Returns the access specifier for this base specifier.
This is the actual base specifier as used for semantic analysis, so the result can never be AS_none. To retrieve the access specifier as written in the source code, use getAccessSpecifierAsWritten().
Definition at line 271 of file DeclCXX.h.
References clang::AS_none, clang::AS_private, and clang::AS_public.
Referenced by CanUseSingleInheritance(), getTypeInfoVTable(), and clang::CXXRecordDecl::setBases().
|
inline |
Retrieves the access specifier as written in the source code (which may mean that no access specifier was explicitly written).
Use getAccessSpecifier() to retrieve the access specifier for use in semantic analysis.
Definition at line 283 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier(), and clang::ASTImporter::Import().
|
inline |
Get the location at which the base class type was written.
Definition at line 239 of file DeclCXX.h.
References clang::TypeLoc::getLocStart(), and clang::TypeSourceInfo::getTypeLoc().
|
inline |
For a pack expansion, determine the location of the ellipsis.
Definition at line 262 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier(), and clang::ASTImporter::Import().
|
inline |
Determine whether this base class's constructors get inherited.
Definition at line 254 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier().
|
inline |
Definition at line 236 of file DeclCXX.h.
References clang::SourceRange::getEnd().
|
inline |
Definition at line 235 of file DeclCXX.h.
References clang::SourceRange::getBegin().
Referenced by checkMoveAssignmentForRepeatedMove().
|
inline |
Retrieves the source range that contains the entire base specifier.
Definition at line 234 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier(), checkMoveAssignmentForRepeatedMove(), and clang::ASTImporter::Import().
|
inline |
Retrieves the type of the base class.
This type will always be an unqualified class type.
Definition at line 290 of file DeclCXX.h.
References clang::TypeSourceInfo::getType(), and clang::QualType::getUnqualifiedType().
Referenced by BuildImplicitBaseInitializer(), CanUseSingleInheritance(), clang::Sema::CheckConstructorAccess(), checkMoveAssignmentForRepeatedMove(), ComputeVMIClassTypeInfoFlags(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), clang::CXXRecordDecl::FindBaseClass(), findDecomposableBaseClass(), findDirectBaseWithType(), clang::CXXRecordDecl::FindVirtualBaseClass(), getMSPropertyAttr(), HandleLValueBase(), clang::InitializedEntity::InitializeBase(), LeastDerivedClassWithSameLayout(), print_elem(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::CXXRecordDecl::setBases(), usesMultipleInheritanceModel(), and warnBracedScalarInit().
|
inline |
Retrieves the type and source location of the base class.
Definition at line 295 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier(), and clang::ASTImporter::Import().
|
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 248 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier(), and clang::ASTImporter::Import().
|
inline |
Determine whether this base specifier is a pack expansion.
Definition at line 251 of file DeclCXX.h.
References clang::SourceLocation::isValid().
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier().
|
inline |
Determines whether the base class is a virtual base class (or not).
Definition at line 244 of file DeclCXX.h.
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifier(), BuildImplicitBaseInitializer(), CanUseSingleInheritance(), checkMoveAssignmentForRepeatedMove(), ComputeVMIClassTypeInfoFlags(), FindBaseInitializer(), clang::CXXRecordDecl::FindVirtualBaseClass(), getTypeInfoVTable(), HandleLValueBase(), clang::ASTImporter::Import(), PerformConstructorInitialization(), clang::ento::ExprEngine::ProcessBaseDtor(), and clang::CXXRecordDecl::setBases().
Set that this base class's constructors should be inherited.
Definition at line 257 of file DeclCXX.h.
Referenced by clang::Sema::CheckInheritingConstructorUsingDecl(), and clang::ASTReader::ReadCXXBaseSpecifier().