[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 1 09:59:02 PDT 2025


================
@@ -6324,10 +6324,20 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD,
 
   SetLLVMFunctionAttributesForDefinition(D, Fn);
 
+  auto getPriority = [this](auto *Attr) -> int {
+    int priority = Attr->DefaultPriority;
+    Expr *E = Attr->getPriority();
+    if (E) {
+      if (auto CE = E->getIntegerConstantExpr(this->getContext()))
----------------
tynasello wrote:

Ok I will update. Do you know where in Sema the check should be?

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


More information about the cfe-commits mailing list