]> granicus.if.org Git - clang/commit
Removed Sema::VerifyConstantArrayType(). With the new Array/ConstantArray/VariableArr...
authorSteve Naroff <snaroff@apple.com>
Fri, 31 Aug 2007 17:20:07 +0000 (17:20 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 31 Aug 2007 17:20:07 +0000 (17:20 +0000)
commitd7444aac1af1c2c1d5e5b7467ecf6006ee2d8abe
treea93b435347cf195fc0ef803eaeea7db00a88216b
parent49a436de368c18c3fc669037aa5211b973b076a9
Removed Sema::VerifyConstantArrayType(). With the new Array/ConstantArray/VariableArray nodes, this
routine was causing more trouble than it was worth. Anders/Chris noticed that it could return an error code
without emiting a diagnostic (which results in an silent invalid decl, which should *never* happen). In addition,
this routine didn't work well for typedefs and field decls. Lastly, it didn't consider that initializers aren't
in place yet.

Added Type::getAsConstantArrayType(), Type::getAsVariableArrayType(), Type::getAsVariablyModifiedType(),
and Type::isVariablyModifiedType();

Modified Sema::ParseDeclarator() and Sema::ParseField() to use the new predicates. Also added a FIXME for
the initializer omission. Also added a missing test for "static" @ file scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41647 91177308-0d34-0410-b5e6-96231b3b80d8
AST/Type.cpp
Sema/Sema.h
Sema/SemaDecl.cpp
include/clang/AST/Type.h
test/Sema/array-constraint.c