TypePrinter should not omit the static keyword in array parameter declarators
authorHal Finkel <hfinkel@anl.gov>
Fri, 18 Jul 2014 23:19:20 +0000 (23:19 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 18 Jul 2014 23:19:20 +0000 (23:19 +0000)
commitf3e0265ea03ebcecb3828bb4c8ce5e6016777aec
tree7fa0eecc12ec8710eb55dfe12f19ca96adbc5b87
parentac6b4efaab360171a5872f991913d1dc5a97e1ca
TypePrinter should not omit the static keyword in array parameter declarators

In C99, an array parameter declarator might have the form: direct-declarator
'[' 'static' type-qual-list[opt] assign-expr ']'

and when the size of the array is a constant, don't omit the static keyword
when printing the type. Also, in the VLA case, put a space after the static
keyword (some assignment expression must follow it).

llvm-svn: 213424
clang/lib/AST/TypePrinter.cpp
clang/test/Sema/ast-print.c