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 origin/main HEAD --extensions c,cpp --
clang/lib/AST/ByteCode/InterpBuiltin.cpp clang/lib/AST/ExprConstant.cpp
clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Sema/SemaChecking.cpp
clang/test/AST/ByteCode/builtin-functions.cpp clang/test/CodeGen/builtins.c
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 340b00832..c17a025d1 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -3683,10 +3683,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const
GlobalDecl GD, unsigned BuiltinID,
return RValue::get(
emitBuiltinWithOneOverloadedType<1>(*this, E, Intrinsic::bswap));
}
- case Builtin::BI__builtin_bitreverseg:{
+ case Builtin::BI__builtin_bitreverseg: {
Value *ArgValue = EmitScalarExpr(E->getArg(0));
llvm::IntegerType *IntTy = cast<llvm::IntegerType>(ArgValue->getType());
- assert(IntTy && "LLVM's __builtin_bitreverseg only support integer
variants");
+ assert(IntTy &&
+ "LLVM's __builtin_bitreverseg only support integer variants");
if (IntTy->getBitWidth() == 1)
return RValue::get(ArgValue);
return RValue::get(
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 86b1c7adc..ca1bee679 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2259,12 +2259,13 @@ static bool BuiltinBswapg(Sema &S, CallExpr *TheCall) {
return false;
}
-/// Checks that __builtin_bitreverseg was called with a single argument, which
is an
-/// integer
-static bool BuiltinBitreverseg(Sema &S, CallExpr *TheCall){
+/// Checks that __builtin_bitreverseg was called with a single argument, which
+/// is an integer
+static bool BuiltinBitreverseg(Sema &S, CallExpr *TheCall) {
if (S.checkArgCount(TheCall, 1))
return true;
- ExprResult ArgRes =
S.DefaultFunctionArrayLvalueConversion(TheCall->getArg(0));
+ ExprResult ArgRes =
+ S.DefaultFunctionArrayLvalueConversion(TheCall->getArg(0));
if (ArgRes.isInvalid())
return true;
@@ -2275,9 +2276,9 @@ static bool BuiltinBitreverseg(Sema &S, CallExpr
*TheCall){
QualType ArgTy = Arg->getType();
- if (!ArgTy->isIntegerType()){
+ if (!ArgTy->isIntegerType()) {
S.Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type)
- << 1 << /*scalar=*/ 1 << /*unsigned integer*/ 0<< /*float point*/ 0
+ << 1 << /*scalar=*/1 << /*unsigned integer*/ 0 << /*float point*/ 0
<< ArgTy;
return true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/179126
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits