[PATCH] D129951: adds `__disable_adl` attribute
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 6 14:58:49 PST 2023
rsmith added inline comments.
================
Comment at: clang/include/clang/Basic/Attr.td:4132
+def DisableADL : InheritableAttr {
+ let Spellings = [Keyword<"__disable_adl">];
+ let Subjects = SubjectList<[Function]>;
----------------
Has this syntax been discussed already? If not, why did you choose keyword syntax instead of a normal attribute?
================
Comment at: clang/include/clang/Basic/AttrDocs.td:6851
+def DisableADLDocs : Documentation {
+ let Content = [{Please don't LGTM without this being fully documented.}];
+}
----------------
OK!
================
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)
----------------
Maybe also global `operator new` / `operator delete`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129951/new/
https://reviews.llvm.org/D129951
More information about the cfe-commits
mailing list