A bit of program simplification from r185056
authorLarisse Voufo <lvoufo@google.com>
Thu, 27 Jun 2013 03:36:30 +0000 (03:36 +0000)
committerLarisse Voufo <lvoufo@google.com>
Thu, 27 Jun 2013 03:36:30 +0000 (03:36 +0000)
llvm-svn: 185058

clang/lib/Sema/SemaInit.cpp
clang/lib/Sema/SemaOverload.cpp

index cbca84d..9370287 100644 (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()))
index b1fe76a..3f7ab1c 100644 (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(),