hfinkel added a comment. In https://reviews.llvm.org/D37624#885311, @choikwa wrote:
> In https://reviews.llvm.org/D37624#885308, @hfinkel wrote: > > > 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. > > > Given A::B::C<D>(T a), only 'C<D>' is meaningful in g++'s matcher. Adding > anything else escapes the match [ 'B::C', 'C<D>(' ]. > It seems like g++ will also not match single quotes as a whole, ie. int > fooboo() is matched by 'foo,boo'. Can you get more information on what GCC actually implemented and why? It's not clear to me that ignoring the namespaces is the most-useful way to do this. I don't want to emulate GCC bugs, but maybe there's a good reason why their implementation works this way. https://reviews.llvm.org/D37624 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits