[cfe-commits] [Patch] Produce errors for 'static' and type qualifiers in array declarators
Hans Wennborg
hans at chromium.org
Fri Aug 10 02:27:43 PDT 2012
On Mon, Aug 6, 2012 at 7:47 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> + if (chunkIndex > 0) {
> + const DeclaratorChunk &NextChunk = D.getTypeObject(chunkIndex - 1);
> + if (NextChunk.Kind == DeclaratorChunk::Array) {
>
> This looks suspect: I think you need to trigger this error in more
> cases. Consider, for example, "void f(int (*x)[static 10]);". Take a
> look at checkQualifiedFunction.
Ah, thanks for pointing that out. Attaching a new attempt.
Thanks,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: static_in_array_decls2.patch
Type: application/octet-stream
Size: 5077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120810/4fa5e3aa/attachment.obj>
More information about the cfe-commits
mailing list