nridge added a comment.

Another test case that comes to mind is:

  void f1(int a, int b);
  void f2(int c, int d);
  
  template <typename... Args>
  void foo(Args... args) {
    if (cond) {
      f1(args...);
    } else {
      f2(args...);
    }
  }
  
  int main() {
    foo(1, 2);
  }

I guess in this case it will use the parameters names from `f1`, because that's 
the first call that appears in the function body in traversal order?

I think that's fine, functions written like this are probably not very common. 
Still good to add to the test suite to document the behaviour.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124690/new/

https://reviews.llvm.org/D124690

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

Reply via email to