]> granicus.if.org Git - clang/commit
Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will...
authorAnders Carlsson <andersca@mac.com>
Sat, 28 Feb 2009 21:56:50 +0000 (21:56 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 28 Feb 2009 21:56:50 +0000 (21:56 +0000)
commit1a7acfa0de7364b24599be4329d7ee2944540428
treeaa763079626395f00d6d7d2f5f7d2b31ae876d3a
parentb098c14c525894702994d5dc4b58a4283ac25c63
Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will have the right type by the time the initializer is checked. This ensures that code like

int a[(int)(1.0 / 1.0) = { 1 } will work.

Eli, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65725 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/Sema/const-eval.c