[PATCH] Add partial support for the hasDeclaration() matcher in the dynamic layer.

Manuel Klimek klimek at google.com
Wed Oct 23 07:28:11 PDT 2013


On Mon, Oct 21, 2013 at 8:29 PM, Samuel Benzaquen <sbenza at google.com> wrote:

>
>
> ================
> Comment at: include/clang/ASTMatchers/ASTMatchers.h:1690
> @@ -1684,1 +1689,3 @@
> +                                        TemplateSpecializationType),
> +      false>(InnerMatcher);
>  }
> ----------------
> Manuel Klimek wrote:
> > /*EnableCompileTimeChecks=*/false
> > (here and elsewhere)
> >
> > On the other hand, I'm not sure I like this (and I've gone back and
> forth on that detail myself ;)
> > There's some principal beauty to being able to use all nodes that have
> getDecl() in hasDeclaration. On the other hand, the further down we push
> the error checks, the worse the error messages for our users. Due to how
> bad template error messages still are, this is one of the largest problems
> we have today. The dynamic matchers will hopefully get some of that out of
> the way, but I still believe that for now we just want to spell out all the
> types it's callable on.
> Do you have a such a list?
> From the implementation of HasDeclarationMatcher is not obvious.
>

Ah, I didn't remember we added the templated getDecl() overload at some
point...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131023/c2d05bf6/attachment.html>


More information about the cfe-commits mailing list