make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
            ^~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58220 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 5fc513d..89b34e6 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -315,6 +315,12 @@
       const llvm::Type* RetTy = CGM.getTypes().ConvertType(ILE->getType());
       return llvm::Constant::getNullValue(RetTy);
     }
+    
+    // FIXME: We don't codegen or sema designators yet.
+    if (ILE->hadDesignators()) {
+      CGM.ErrorUnsupported(ILE, "initializer list with designators");
+      return llvm::UndefValue::get(ConvertType(ILE->getType()));
+    }
 
     if (ILE->getType()->isArrayType())
       return EmitArrayInitialization(ILE);