[clang] [clang] Fix crashes when passing VLA to va_arg (PR #119563)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 16 12:42:50 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 f4081711f0884ec7afe93577e118ecc89cb7b1cf 7dcd400df3670d749902ab04485974ba843415f2 --extensions c,cpp -- clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/Sema/SemaExpr.cpp clang/test/CodeGen/xcore-abi.c clang/test/Sema/varargs.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index fca678e024..4c1cb82219 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -16540,9 +16540,9 @@ ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc,
if (TInfo->getType()->isArrayType()) {
DiagRuntimeBehavior(TInfo->getTypeLoc().getBeginLoc(), E,
- PDiag(diag::warn_second_parameter_to_va_arg_array)
- << TInfo->getType()
- << TInfo->getTypeLoc().getSourceRange());
+ PDiag(diag::warn_second_parameter_to_va_arg_array)
+ << TInfo->getType()
+ << TInfo->getTypeLoc().getSourceRange());
}
// Check for va_arg where arguments of the given type will be promoted
``````````
</details>
https://github.com/llvm/llvm-project/pull/119563
More information about the cfe-commits
mailing list