Rakete1111 added a comment. rsmith:
> Some thoughts on this: > > - Can this be unified with the lookup code in HandleDeclarator? This is > really the same lookup, repeated in two places. What I wrote: > I don't think so, because HandleDeclarator is called after having already > parsed the function declaration. I cached it now, but the cleanest solution > that I could think of is to use new. Is this appropriate? Or do you have an > alternative suggestion? Maybe a `llvm::Optional` is more appropriate? > - It'd be nice to cache this lookup, rather than performing it three times > (once when disambiguating a parenthesized initializer from a function > declaration, once when we're about to parse a parameter-declaration-clause, > and once in HandleDeclarator after parsing completes -- though at least > that's reduced to two lookups if you make the change I suggested in > ParseParameterDeclarationClause) Hmm let me see what I can do about that. > - If we don't do the caching, what happens if lookup fails due to ambiguity? > Do we get the same error multiple times (once for each time we perform the > lookup)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits