[clang] [Clang] Add attribute for consteval builtin functions (PR #91894)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 14 11:03:44 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 17daa204feadf9c28fc13b7daa69c3cbe865b238 ec88839cb34bf2a5f57edd376e30d8c08740f855 -- 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 d651ee2f50..3da0ba9f39 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2411,7 +2411,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