From: Eli Friedman Date: Tue, 17 Sep 2013 04:07:04 +0000 (+0000) Subject: Don't build extra init lists. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08f0bbc4d46daf1b66035b66f6ef497aedf59a42;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190845 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index ab80278f6d..7b41ee1af3 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -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 {