[PATCH] D72089: [Syntax] Build declarator nodes
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 16 07:00:08 PDT 2020
gribozavr2 added inline comments.
================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:1210
+ `-;
+ )txt"},
};
----------------
hlopko wrote:
> gribozavr2 wrote:
> > A few complex tests that combine multiple declarators would be nice (especially to test that the delayed fold logic composes correctly).
> >
> > ```
> > char (*(*x[10])(short a, int b))[20];
> > char (*(*x[10][20])(short a, int b))[30][40];
> > void x(char a, short (*b)(int));
> > void x(char a, short (*b)(int), long (**c)(long long));
> > void (*x(char a, short (*b)(int)))(long);
> > ```
> >
> > Also qualifiers -- or are they not implemented yet?
> >
> > ```
> > int * const * volatile x;
> > ```
> >
> Some of these tests actually crash, so I'll debug/fix in a separate patch.
BTW, would be also nice to have trailing return types not at the top level:
`auto x(char a, auto (*b)(int) -> short) -> void;`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72089/new/
https://reviews.llvm.org/D72089
More information about the cfe-commits
mailing list