[clang] Add size filter for stack auto init (PR #74777)

via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 14:47:44 PST 2023


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 c6805ea44af3bfd57e6b46f2d65ec6b0d0d6c64a 00af66353d938c6ce59dada49c8bededb06ac4fc -- clang/test/CodeGenCXX/auto-var-init-size-bound.cpp clang/lib/CodeGen/CGDecl.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/clang_f_opts.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 1f9650e60d..b9d65a5ee9 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -1759,7 +1759,7 @@ void CodeGenFunction::emitZeroOrPatternForAutoVarInit(QualType type,
                                                       const VarDecl &D,
                                                       Address Loc) {
   auto trivialAutoVarInit = getContext().getLangOpts().getTrivialAutoVarInit();
-  auto trivialAutoVarInitSizeBound = 
+  auto trivialAutoVarInitSizeBound =
       getContext().getLangOpts().TrivialAutoVarInitSizeBound;
   CharUnits Size = getContext().getTypeSizeInChars(type);
   bool isVolatile = type.isVolatileQualified();

``````````

</details>


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


More information about the cfe-commits mailing list