aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.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/Sema/SemaInit.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/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 5d7f705edb..77679ee36f 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -867,9 +867,7 @@ InitListChecker::CheckDesignatedInitializer(InitListExpr *IList,
IndexExpr = DIE->getArrayRangeEnd(*D);
if (DesignatedStartIndex.getZExtValue() != DesignatedEndIndex.getZExtValue())
- SemaRef->Diag(D->getEllipsisLoc(),
- diag::warn_gnu_array_range_designator_side_effects)
- << SourceRange(D->getLBracketLoc(), D->getRBracketLoc());
+ FullyStructuredList->sawArrayRangeDesignator();
}
if (isa<ConstantArrayType>(AT)) {