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 h,cpp,c --
clang/lib/CodeGen/TargetBuiltins/AVR.cpp clang/test/Preprocessor/avr-builtins.c
clang/test/Sema/avr-builtins.c clang/include/clang/Basic/TargetBuiltins.h
clang/lib/Basic/Targets/AVR.cpp clang/lib/Basic/Targets/AVR.h
clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CodeGenFunction.h
clang/lib/Sema/SemaChecking.cpp clang/test/CodeGen/avr/avr-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/include/clang/Basic/TargetBuiltins.h
b/clang/include/clang/Basic/TargetBuiltins.h
index 2c6d007e4..8cf8720f7 100644
--- a/clang/include/clang/Basic/TargetBuiltins.h
+++ b/clang/include/clang/Basic/TargetBuiltins.h
@@ -478,13 +478,13 @@ namespace clang {
/// AVR builtins
namespace AVR {
- enum {
- LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
+ enum {
+ LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
#include "clang/Basic/BuiltinsAVR.def"
- LastTSBuiltin
- };
- }
+ LastTSBuiltin
+ };
+ } // namespace AVR
static constexpr uint64_t LargestBuiltinID = std::max<uint64_t>(
{ARM::LastTSBuiltin, AArch64::LastTSBuiltin, BPF::LastTSBuiltin,
diff --git a/clang/lib/CodeGen/TargetBuiltins/AVR.cpp
b/clang/lib/CodeGen/TargetBuiltins/AVR.cpp
index bb7b4fc45..2c6768a4e 100644
--- a/clang/lib/CodeGen/TargetBuiltins/AVR.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/AVR.cpp
@@ -247,8 +247,7 @@ Value *CodeGenFunction::EmitAVRBuiltinExpr(unsigned
BuiltinID,
// Map is a compile-time constant (validated in Sema).
Expr::EvalResult MapResult;
E->getArg(0)->EvaluateAsInt(MapResult, getContext());
- uint32_t Map =
- static_cast<uint32_t>(MapResult.Val.getInt().getZExtValue());
+ uint32_t Map =
static_cast<uint32_t>(MapResult.Val.getInt().getZExtValue());
Value *Bits = EmitScalarExpr(E->getArg(1));
Value *Val = EmitScalarExpr(E->getArg(2));
@@ -272,8 +271,7 @@ Value *CodeGenFunction::EmitAVRBuiltinExpr(unsigned
BuiltinID,
// Nibble 8-14: undefined per GCC docs, treat as 0.
continue;
}
- Value *Shifted =
- Builder.CreateShl(Bit, llvm::ConstantInt::get(I8Ty, I));
+ Value *Shifted = Builder.CreateShl(Bit, llvm::ConstantInt::get(I8Ty, I));
Result = Builder.CreateOr(Result, Shifted);
}
return Result;
``````````
</details>
https://github.com/llvm/llvm-project/pull/203214
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits