aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-29 19:42:23 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-29 19:42:23 +0000
commita9c878086036de36482cc21e35a33cabe9699b0a (patch)
tree209336586d89088ff8f03a2ef9bda580c7d195d7 /lib/CodeGen/CGExprScalar.cpp
parentda3200986d9ec2ed0920e4d84ac210c889136946 (diff)
Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index f855e23ba0..1d389b6049 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -169,6 +169,10 @@ public:
Value *VisitInitListExpr(InitListExpr *E) {
unsigned NumInitElements = E->getNumInits();
+ if (E->hadArrayRangeDesignator()) {
+ CGF.ErrorUnsupported(E, "GNU array range designator extension");
+ }
+
const llvm::VectorType *VType =
dyn_cast<llvm::VectorType>(ConvertType(E->getType()));