jkorous-apple added inline comments.

================
Comment at: lib/Index/USRGeneration.cpp:757
       VisitType(FT->getReturnType());
-      for (const auto &I : FT->param_types())
+      Out << '(';
+      for (const auto &I : FT->param_types()) {
----------------
arphaman wrote:
> I believe you can drop the '(' and ')'. The '#' should be enough to prevent 
> the USR collision.
Actually, this is a great question!

I was worried it might not be the case so I created two more test cases. 
Let's try to imagine there are no parentheses in those USRs.
First two test cases could be solved by using 'v' or something for functions 
taking no arguments. But 3rd and 4th test cases would definitely need some 
disambiguation then.

I am not saying this is the only possible way how to represent function 
pointers but for proposed solution those parentheses are needed.


https://reviews.llvm.org/D38707



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to