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

2022-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. `clang -x objective-c++ -Weverything -std=c++14 -c test.mm` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121748/new/ https://reviews.llvm.org/D121748 ___ cfe-commits mailing li

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

2022-03-21 Thread Alex Langford via Phabricator via cfe-commits
bulbazord added a comment. In D121748#3397715 , @arphaman wrote: > 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 > T umax(T a, T b) { > return a

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

2022-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
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 T umax(T a, T b) { return a; } produces this error: test.mm:3:3: error: declaration of 'umax' shadows template par

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

2022-03-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I see, thanks! Let me think a bit more about this change and test it on our codebase to see if this is a viable Sema change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121748/new/ https://reviews.llvm.org/D121748

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

2022-03-16 Thread Alex Langford via Phabricator via cfe-commits
bulbazord added a comment. In D121748#3384357 , @arphaman wrote: > Is there a Swift-based test case you have that demonstrates the original > problem from Swift's clang importer side? I'm curious to see where it > manifests in Swift. % cat Test.h

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

2022-03-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Is there a way this can be tested from Clang? Also, is there a Swift-based test case you have that demonstrates the original problem from Swift's clang importer side? I'm curious to see where it manifests in Swift. Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2022-03-15 Thread Alex Langford via Phabricator via cfe-commits
bulbazord added a comment. I'm not quite sure the best way to test this. Looks like `Sema::LookupName` isn't currently directly tested. I've run the test suite and did not find any new failing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

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

2022-03-15 Thread Alex Langford via Phabricator via cfe-commits
bulbazord created this revision. bulbazord added a reviewer: arphaman. Herald added a project: All. bulbazord requested review of this revision. Herald added a project: clang. `Sema::LookupName` essentially has two possible code paths based on what language is currently being used. The predicate s