[clang] [clang] Better bitfield access units (PR #65742)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 01:19:12 PST 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 8cfb71613c452dd45a84a74affe8464bfd33de02 b4cb8945224633fef27b69f0eed34f505032f76e -- clang/test/CodeGen/aapcs-bitfield-access-unit.c clang/test/CodeGen/bitfield-access-pad.c clang/test/CodeGen/bitfield-access-unit.c clang/test/CodeGenCXX/bitfield-access-empty.cpp clang/test/CodeGenCXX/bitfield-access-tail.cpp clang/test/CodeGenCXX/bitfield-ir.cpp clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/TargetInfo.cpp clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Targets/AArch64.h clang/lib/Basic/Targets/ARM.cpp clang/lib/Basic/Targets/ARM.h clang/lib/Basic/Targets/LoongArch.cpp clang/lib/Basic/Targets/LoongArch.h clang/lib/Basic/Targets/Mips.h clang/lib/Basic/Targets/PPC.h clang/lib/Basic/Targets/SystemZ.h clang/lib/Basic/Targets/VE.h clang/lib/Basic/Targets/WebAssembly.h clang/lib/Basic/Targets/X86.h clang/lib/CodeGen/CGRecordLayoutBuilder.cpp clang/test/CodeGen/aapcs-bitfield.c clang/test/CodeGen/arm-bitfield-alignment.c clang/test/CodeGen/arm64-be-bitfield.c clang/test/CodeGen/bitfield-2.c clang/test/CodeGen/debug-info-bitfield-0-struct.c clang/test/CodeGen/no-bitfield-type-align.c clang/test/CodeGen/struct-x86-darwin.c clang/test/CodeGenCXX/bitfield.cpp clang/test/OpenMP/atomic_capture_codegen.cpp clang/test/OpenMP/atomic_read_codegen.c clang/test/OpenMP/atomic_update_codegen.cpp clang/test/OpenMP/atomic_write_codegen.c
``````````

</details>

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

``````````diff
diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h
index aab571e1d2..c046cab93d 100644
--- a/clang/include/clang/Basic/TargetInfo.h
+++ b/clang/include/clang/Basic/TargetInfo.h
@@ -863,9 +863,7 @@ public:
 
   /// Return true, iff unaligned accesses are a single instruction (rather than
   /// a synthesized sequence).
-  bool hasUnalignedAccess() const {
-    return HasUnalignedAccess;
-  }
+  bool hasUnalignedAccess() const { return HasUnalignedAccess; }
 
   /// \brief Returns the default value of the __USER_LABEL_PREFIX__ macro,
   /// which is the prefix given to user symbols by default.

``````````

</details>


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


More information about the cfe-commits mailing list