[clang] [clang][NFC] Code Cleanup of inferred noreturn attributes in explicit specializations. (PR #151815)

via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 2 05:40:32 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/Sema/SemaDecl.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 0cef89897..e56799dea 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3269,7 +3269,9 @@ void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old,
       continue;
 
     if (isa<InferredNoReturnAttr>(I)) {
-      if (auto *FD = dyn_cast<FunctionDecl>(New); FD && FD->getTemplateSpecializationKind() == TSK_ExplicitSpecialization)
+      if (auto *FD = dyn_cast<FunctionDecl>(New);
+          FD &&
+          FD->getTemplateSpecializationKind() == TSK_ExplicitSpecialization)
         continue; // Don't propagate inferred noreturn attributes to explicit
     }
 

``````````

</details>


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


More information about the cfe-commits mailing list