[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 09:33:54 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 313ad85dfa40a18f2edefd7ce2edc0528d5a554a 0f03f52e68a0dd1bbe01a9eefa9337ae54e57586 --extensions cpp,c -- clang/test/CodeGen/attr-counted-by-pr111009.c clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/attr-counted-by.c
``````````

</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 f12f8d4bfb..a2a4f8a763 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1051,7 +1051,6 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
     // The whole struct is specificed in the __bdos.
     const ASTRecordLayout &Layout = Ctx.getASTRecordLayout(OuterRD);
 
-
     // Get the full size of the struct.
     llvm::Constant *SizeofStruct =
         ConstantInt::get(ResType, Layout.getSize().getQuantity(), IsSigned);

``````````

</details>


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


More information about the cfe-commits mailing list