A bit of program simplification from r185056

llvm-svn: 185058
This commit is contained in:
Larisse Voufo 2013-06-27 03:36:30 +00:00
parent 85fc876106
commit 70bb43a115
2 changed files with 2 additions and 4 deletions

View File

@ -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()))

View File

@ -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(),