]> granicus.if.org Git - clang/commitdiff
Don't build extra init lists.
authorEli Friedman <eli.friedman@gmail.com>
Tue, 17 Sep 2013 04:07:04 +0000 (04:07 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 17 Sep 2013 04:07:04 +0000 (04:07 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190845 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp

index ab80278f6d3e83f938967727038e83b9530877e7..7b41ee1af3666aaa64322d7a5bc1c1c9cfade181 100644 (file)
@@ -901,7 +901,7 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
     if ((ElemType->isRecordType() || ElemType->isVectorType()) &&
         SemaRef.CheckSingleAssignmentConstraints(ElemType, ExprRes,
                                                  !VerifyOnly)
-          == Sema::Compatible) {
+          != Sema::Incompatible) {
       if (ExprRes.isInvalid())
         hadError = true;
       else {