[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list=<arg1, arg2, ...> to match gcc options.

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 30 23:48:38 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D37624#885295, @choikwa wrote:

> In https://reviews.llvm.org/D37624#885290, @hfinkel wrote:
>
> > In https://reviews.llvm.org/D37624#885288, @choikwa wrote:
> >
> > > - add comment to CPP test to explain usage
> >
> >
> > Thanks. Please also add some tests showing matching overloaded functions, functions with template parameters, etc.
> >
> > Do we need to strip whitespace before trying to match the demangled names?
>
>
> Some cursory testing with g++ shows that only the 'test5' of 'test5(float, int, int*)' is matched. 'test5(' or 'test5 (' is not matched. It seems weird that arguments are not matched.
>
> g++ man page shows
>
>   "The function name to be matched is its user-visible name, such as "vector<int> blah(const vector<int> &)", not the internal mangled name"
>
> but it doesn't seem to be including parameters.


Interesting. Can you tell what GCC is doing w.r.t. namespace names, class names, etc. and template parameters?

> Also uncovered a bug where sub argument list containing comma needs to be surrounded by single quote, but clang seems to ignores single quote.
>  I'll try to dig around ArgList implementation to see if it can return argument surrounded by single-quote as a whole.




https://reviews.llvm.org/D37624





More information about the cfe-commits mailing list