================
@@ -3320,6 +3320,11 @@ static void AddFunctionParameterChunks(
 
   for (unsigned P = Start, N = Function->getNumParams(); P != N; ++P) {
     const ParmVarDecl *Param = Function->getParamDecl(P);
+    // Select the first parameter name for consistent results with Index.
+    for (auto *Redecl : Function->redecls()) {
+      if (auto *RParam = Redecl->getParamDecl(P); RParam->getIdentifier())
+        Param = RParam;
----------------
timon-ul wrote:

I just noticed that I missed the `break` by accident, but it passes, so 
`redecl()` is going through them from last to first, which is kinda annoying 
since I would prefer the other way around. Will think of a nicer way of doing 
this.

https://github.com/llvm/llvm-project/pull/206716
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to