forked from OSchip/llvm-project
A bit of program simplification from r185056
llvm-svn: 185058
This commit is contained in:
parent
85fc876106
commit
70bb43a115
|
@ -6251,8 +6251,7 @@ bool InitializationSequence::Diagnose(Sema &S,
|
|||
break;
|
||||
|
||||
case OR_No_Viable_Function:
|
||||
if (!DestType.getNonReferenceType()->isIncompleteType() ||
|
||||
!S.RequireCompleteType(Kind.getLocation(),
|
||||
if (!S.RequireCompleteType(Kind.getLocation(),
|
||||
DestType.getNonReferenceType(),
|
||||
diag::err_typecheck_nonviable_condition_incomplete,
|
||||
Args[0]->getType(), Args[0]->getSourceRange()))
|
||||
|
|
|
@ -3232,8 +3232,7 @@ Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {
|
|||
diag::err_typecheck_ambiguous_condition)
|
||||
<< From->getType() << ToType << From->getSourceRange();
|
||||
else if (OvResult == OR_No_Viable_Function && !CandidateSet.empty()) {
|
||||
if (!ToType->isIncompleteType() ||
|
||||
!RequireCompleteType(From->getLocStart(), ToType,
|
||||
if (!RequireCompleteType(From->getLocStart(), ToType,
|
||||
diag::err_typecheck_nonviable_condition_incomplete,
|
||||
From->getType(), From->getSourceRange()))
|
||||
Diag(From->getLocStart(),
|
||||
|
|
Loading…
Reference in New Issue