]> granicus.if.org Git - clang/commit
fix PR4073 by making designated initializer checking code use
authorChris Lattner <sabre@nondot.org>
Sat, 25 Apr 2009 21:59:05 +0000 (21:59 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 25 Apr 2009 21:59:05 +0000 (21:59 +0000)
commit3bf6893b77c30cb774100e0fa7ae029331675ec1
treef403488befb3f745467a7869d582e6c248ff1022
parent17e1c5eba505d0c99e35aa6143631653db668fb6
fix PR4073 by making designated initializer checking code use
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.

There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.

This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
test/Sema/designated-initializers.c