[PATCH] D121748: [clang][Sema] Better support for ObjC++ in Sema::LookupName

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 13:56:26 PDT 2022


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



More information about the cfe-commits mailing list