[PATCH] Improve diagnostic message for misplaced square brackets

Richard Trieu rtrieu at google.com
Wed May 28 16:11:52 PDT 2014


Add code to handle:

  int [] *a;

This is handled by inserting parens in the token stream, then backtracking and have ParseDirectDeclarator handle the parens as normal through ParseParenDeclarator.

http://reviews.llvm.org/D2712

Files:
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Parse/Parser.h
  lib/Parse/ParseDecl.cpp
  test/Parser/brackets.c
  test/Parser/brackets.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2712.9892.patch
Type: text/x-patch
Size: 14138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140528/b2273e5a/attachment.bin>


More information about the cfe-commits mailing list