r190845 - Don't build extra init lists.

Eli Friedman eli.friedman at gmail.com
Mon Sep 16 21:07:04 PDT 2013


Author: efriedma
Date: Mon Sep 16 23:07:04 2013
New Revision: 190845

URL: http://llvm.org/viewvc/llvm-project?rev=190845&view=rev
Log:
Don't build extra init lists.

AssignConvertType::IncompatibleVectors means the two types are in fact
compatible. :)

No testcase; I don't think the extra init list has any actual visible effect
other than making the resulting AST dump look a bit strange.

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=190845&r1=190844&r2=190845&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Sep 16 23:07:04 2013
@@ -901,7 +901,7 @@ void InitListChecker::CheckSubElementTyp
     if ((ElemType->isRecordType() || ElemType->isVectorType()) &&
         SemaRef.CheckSingleAssignmentConstraints(ElemType, ExprRes,
                                                  !VerifyOnly)
-          == Sema::Compatible) {
+          != Sema::Incompatible) {
       if (ExprRes.isInvalid())
         hadError = true;
       else {





More information about the cfe-commits mailing list