clang API Documentation
#include "clang/AST/DeclCXX.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTLambda.h"#include "clang/AST/ASTMutationListener.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/TypeLoc.h"#include "clang/Basic/IdentifierTable.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"
Go to the source code of this file.
Functions | |
| static bool | SawBase (const CXXRecordDecl *, void *) |
| static CanQualType | GetConversionType (ASTContext &Context, NamedDecl *Conv) |
| static void | CollectVisibleConversions (ASTContext &Context, CXXRecordDecl *Record, bool InVirtual, AccessSpecifier Access, const llvm::SmallPtrSet< CanQualType, 8 > &ParentHiddenTypes, ASTUnresolvedSet &Output, UnresolvedSetImpl &VOutput, llvm::SmallPtrSet< NamedDecl *, 8 > &HiddenVBaseCs) |
| static void | CollectVisibleConversions (ASTContext &Context, CXXRecordDecl *Record, ASTUnresolvedSet &Output) |
| static bool | recursivelyOverrides (const CXXMethodDecl *DerivedMD, const CXXMethodDecl *BaseMD) |
| static const char * | getAccessName (AccessSpecifier AS) |
| static void CollectVisibleConversions | ( | ASTContext & | Context, |
| CXXRecordDecl * | Record, | ||
| bool | InVirtual, | ||
| AccessSpecifier | Access, | ||
| const llvm::SmallPtrSet< CanQualType, 8 > & | ParentHiddenTypes, | ||
| ASTUnresolvedSet & | Output, | ||
| UnresolvedSetImpl & | VOutput, | ||
| llvm::SmallPtrSet< NamedDecl *, 8 > & | HiddenVBaseCs | ||
| ) | [static] |
Collect the visible conversions of a base class.
| Record | a base class of the class we're considering |
| InVirtual | whether this base class is a virtual base (or a base of a virtual base) |
| Access | the access along the inheritance path to this base |
| ParentHiddenTypes | the conversions provided by the inheritors of this base |
| Output | the set to which to add conversions from non-virtual bases |
| VOutput | the set to which to add conversions from virtual bases |
| HiddenVBaseCs | the set of conversions which were hidden in a virtual base along some inheritance path |
Definition at line 1068 of file DeclCXX.cpp.
References clang::ASTUnresolvedSet::addDecl(), clang::UnresolvedSetImpl::addDecl(), clang::CXXRecordDecl::bases(), clang::CXXRecordDecl::conversion_begin(), clang::CXXRecordDecl::conversion_end(), clang::Type::getAs(), GetConversionType(), clang::RecordType::getDecl(), and clang::CXXRecordDecl::MergeAccess().
Referenced by CollectVisibleConversions(), and clang::CXXRecordDecl::getVisibleConversionFunctions().
| static void CollectVisibleConversions | ( | ASTContext & | Context, |
| CXXRecordDecl * | Record, | ||
| ASTUnresolvedSet & | Output | ||
| ) | [static] |
Collect the visible conversions of a class.
This would be extremely straightforward if it weren't for virtual bases. It might be worth special-casing that, really.
Definition at line 1133 of file DeclCXX.cpp.
References clang::ASTUnresolvedSet::addDecl(), clang::ASTUnresolvedSet::append(), clang::CXXRecordDecl::bases(), clang::UnresolvedSetImpl::begin(), CollectVisibleConversions(), clang::CXXRecordDecl::conversion_begin(), clang::CXXRecordDecl::conversion_end(), clang::UnresolvedSetImpl::end(), clang::Type::getAs(), GetConversionType(), clang::UnresolvedSetIterator::getDecl(), and clang::RecordType::getDecl().
| static const char* getAccessName | ( | AccessSpecifier | AS | ) | [static] |
Definition at line 2185 of file DeclCXX.cpp.
References clang::AS_none, clang::AS_private, clang::AS_protected, and clang::AS_public.
Referenced by clang::operator<<().
| static CanQualType GetConversionType | ( | ASTContext & | Context, |
| NamedDecl * | Conv | ||
| ) | [static] |
Definition at line 1049 of file DeclCXX.cpp.
References clang::Decl::getAsFunction(), clang::ASTContext::getCanonicalType(), and clang::NamedDecl::getUnderlyingDecl().
Referenced by CollectVisibleConversions().
| static bool recursivelyOverrides | ( | const CXXMethodDecl * | DerivedMD, |
| const CXXMethodDecl * | BaseMD | ||
| ) | [static] |
Definition at line 1390 of file DeclCXX.cpp.
References clang::CXXMethodDecl::begin_overridden_methods(), clang::CXXMethodDecl::end_overridden_methods(), and clang::CXXMethodDecl::getCanonicalDecl().
Referenced by clang::CXXMethodDecl::getCorrespondingMethodInClass().
| static bool SawBase | ( | const CXXRecordDecl * | , |
| void * | |||
| ) | [static] |
Callback function for CXXRecordDecl::forallBases that acknowledges that it saw a base class.
Definition at line 390 of file DeclCXX.cpp.
Referenced by clang::CXXRecordDecl::hasAnyDependentBases().