================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:378
@@ +377,3 @@
+template <typename T, typename ArgT>
+class HasOverloadedOperatorNameMatcher : public SingleNodeMatcherInterface<T> {
+public:
----------------
Edwin Vane wrote:
> Manuel Klimek wrote:
> > Please put in a TOOLING_COMPILE_ASSERT that T is one of the supported types?
> A static assert for T isn't necessary I think since if it isn't one of the 
> supported types you just get an error saying there's no overload for 
> matchesSpecialized() for the given T. This is the same as the 
> HasDeclarationMatcher right below.
> 
> As for ArgT, it can really only be StringRef but the error will point 
> somewhere in PolymorphicMatcherWithParam1 probably as it tries to construct 
> HasOverloadedOperatorName. I'll check the error message and if it's not 
> obvious I'll add a static assert.
I'm aware it isn't necessary, I was hoping we could get a nicer error in. That 
hasDeclaration doesn't do that doesn't mean it's good, just that it was written 
before we became aware of the problem of users to understand the template error 
message :)


http://llvm-reviews.chandlerc.com/D494

BRANCH
  matchers

ARCANIST PROJECT
  clang
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to