Anastasia added inline comments.

================
Comment at: clang/lib/Sema/SemaOverload.cpp:9870
 
+  if (S.getLangOpts().OpenCL) {
+    if (const auto *CD1 = 
dyn_cast_or_null<CXXConstructorDecl>(Cand1.Function)) {
----------------
I think we should remove the OpenCL check since it is not OpenCL specific rule 
and you are using common helpers indeed!

I also wonder if this should be applied to all member functions not only ctors 
since `isBetterOverloadCandidate` should be used for everything?

However it seems that other members are already handled somehow 
https://godbolt.org/z/MrWKPKed7. Do you know where this handling comes from?


================
Comment at: clang/test/CodeGenOpenCLCXX/addrspace-constructors.clcpp:14
   // Local variables are handled in local_addrspace_init.clcpp
-  // FIXME: __private and __generic constructors clash for __private variable
-  // X() /*__generic*/ = default;
+  X() /*__generic*/ = default;
   X() __private : x(0) {}
----------------
Let's add a `CHECK` to make sure that the overload with the specific address 
space is used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102850

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

Reply via email to