On Wed, May 28, 2014 at 4:11 PM, Richard Trieu <[email protected]> wrote:
> 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. This seems like more trouble than I'd expected (and it's still not completely right, since its mini-lookahead-parser misses lots of cases, such as 'int [] &a;'). Is it possible to handle this differently, as follows: * parse the bracket declarators into TempDeclarator, then * parse a direct declarator, then * scan the declarator you just parsed and check if it needs parens, and include them in the fix-it if so 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 >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
