forked from OSchip/llvm-project
No need to build the visible conversionfunction list for root class.
llvm-svn: 81583
This commit is contained in:
parent
bbaeca4fef
commit
a31472def0
|
@ -288,10 +288,15 @@ void CXXRecordDecl::addedAssignmentOperator(ASTContext &Context,
|
|||
OverloadedFunctionDecl *
|
||||
CXXRecordDecl::getVisibleConversionFunctions(ASTContext &Context,
|
||||
CXXRecordDecl *RD) {
|
||||
if (RD == this) {
|
||||
// If root class, all conversions are visible.
|
||||
if (RD->bases_begin() == RD->bases_end())
|
||||
return &Conversions;
|
||||
// If visible conversion list is already evaluated, return it.
|
||||
if (RD == this &&
|
||||
VisibleConversions.function_begin() != VisibleConversions.function_end())
|
||||
if (VisibleConversions.function_begin()
|
||||
!= VisibleConversions.function_end())
|
||||
return &VisibleConversions;
|
||||
}
|
||||
|
||||
QualType ClassType = Context.getTypeDeclType(this);
|
||||
if (const RecordType *Record = ClassType->getAs<RecordType>()) {
|
||||
|
|
Loading…
Reference in New Issue