[clang] Diagnose misuse of the cleanup attribute (PR #80040)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 31 07:31:01 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 7c03d5d41daad230406890499cf4fa14973ee5eb 1a3cc18276be89969d5a262ff12499d20fd925ee -- clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaExpr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 02d20a25ea..bd7074b280 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -3785,8 +3785,7 @@ static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
if (S.IsPointerToPointer(ParamTy, Ty)) {
VarDecl *VD = cast<VarDecl>(D);
- S.Diag(Loc, diag::warn_called_on_unallocated_object)
- << NI.getName() << VD;
+ S.Diag(Loc, diag::warn_called_on_unallocated_object) << NI.getName() << VD;
return;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/80040
More information about the cfe-commits
mailing list