[clang] [clang] All {con, de}structor attributes to use template args (PR #67376)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 17:24:53 PDT 2023


================
@@ -1156,9 +1156,11 @@ def ConstInit : InheritableAttr {
 
 def Constructor : InheritableAttr {
   let Spellings = [GCC<"constructor">];
-  let Args = [DefaultIntArgument<"Priority", 65535>];
+  let Args = [ExprArgument<"Priority", 1>];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [CtorDtorDocs];
+  let TemplateDependent = 1;
+  let AdditionalMembers = [{ static const int DefaultPriority = 65535; }];
----------------
erichkeane wrote:

@AaronBallman : I see in your other patch (#67360) you're using this as a magic number!  Might be useful to get on the same page as this author.
```suggestion
  let AdditionalMembers = [{ static constexpr int DefaultPriority = 65535; }];
```

https://github.com/llvm/llvm-project/pull/67376


More information about the cfe-commits mailing list