[clang] [Clang] Add attribute for consteval builtin functions (PR #91894)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 14 11:03:58 PDT 2024


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 39d123f58a0e3c5f1a928940244b8dfd827fd4e5 a3aaf28d92499b1e76b49a0499be87b5b706155c -- clang/include/clang/Basic/Builtins.h clang/lib/Basic/Builtins.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaExpr.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 8554cb5972..c24ebc3ef4 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2373,7 +2373,8 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type,
 
   ConstexprSpecKind ConstexprKind = ConstexprSpecKind::Unspecified;
   if (Context.BuiltinInfo.isImmediate(ID)) {
-    assert(getLangOpts().CPlusPlus20 && "consteval builtins should only be available in C++20 mode");
+    assert(getLangOpts().CPlusPlus20 &&
+           "consteval builtins should only be available in C++20 mode");
     ConstexprKind = ConstexprSpecKind::Consteval;
   }
 

``````````

</details>


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


More information about the cfe-commits mailing list