cor3ntin added inline comments.
================ Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5756 + if (FunctionDecl *F = D->getAsFunction(); + F->isOverloadedOperator() || F->isCXXClassMember()) { + S.Diag(AL.getLoc(), diag::err_disable_adl_no_operators) ---------------- aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballman wrote: > > > cjdb wrote: > > > > rsmith wrote: > > > > > Maybe also global `operator new` / `operator delete`? > > > > How does ADL even work in with the global namespace? Should it be > > > > invalid to apply here? > > > Should this be `isCXXInstanceMember()` instead? Or do we intend to > > > disallow this on static member functions? > > Static member functions would be qualified, and not involve ADL. This seems > > correct. > Hmmm, I think they're *normally* qualified, but if you call the static > function from within a member function, it doesn't have to be qualified. nvm, they can be found by adl from within member functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129951/new/ https://reviews.llvm.org/D129951 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits