arphaman added a comment.

I don't think this patch is sound. I found this problem with this change when 
the following file is compiled in Objective-C++ mode:

  template <class T, bool umax = true>
  T umax(T a, T b) {
    return a;
  }

produces this error:

  test.mm:3:3: error: declaration of 'umax' shadows template parameter
  T umax(T a, T b) {
    ^
  test.mm:2:25: note: template parameter is declared here
  template <class T, bool umax = true>
                          ^

which is unexpected and isn't produced in C++ mode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121748

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

Reply via email to