MyDeveloperDay added inline comments.
================ Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:30 +// TODO: Find a better way of detecting a function template. +static bool isFunctionTemplate(const QualType &ParamType) { + // Try to catch both std::function and boost::function ---------------- JonasToth wrote: > Do you want a function-template (`template <class T> void foo(T argument);`) > or the template-function `{std,boost}::function`? > For the first the approach should be the same as above, for the second your > implementation might work. > > But a matcher with `hasAnyName("::std::function", "::boost::function")` would > be cleaner if you can use that instead. I can't seem to get the hasName or hasAnyName matcher pick up std::function<> as an argument Using clang-query, I can't get this to work, did I miss something? ``` match functionDecl(hasAnyParameter(hasType(namedDecl(hasName("::std::function"))))).bind("x") ``` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits