[clang] [-Wunsafe-buffer-usage][NFC] Add testcase for not-unsafe pointer (PR #80076)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 30 15:48:44 PST 2024
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80076
>From ea06ed298ffd5552e98caa2739115bc0ded22ebf Mon Sep 17 00:00:00 2001
From: Jan Korous <jkorous at apple.com>
Date: Wed, 24 Jan 2024 17:28:07 -0800
Subject: [PATCH] [-Wunsafe-buffer-usage][NFC] Add testcase for not-unsafe
pointer
---
.../SemaCXX/warn-unsafe-buffer-usage-fixits-pointer-access.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-pointer-access.cpp b/clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-pointer-access.cpp
index 20d9d33195a6b..ca19702c7ec30 100644
--- a/clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-pointer-access.cpp
+++ b/clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-pointer-access.cpp
@@ -85,6 +85,7 @@ void unsafe_method_invocation_single_param() {
void safe_method_invocation_single_param() {
int* p = new int[10];
+ // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:{{.*}}-[[@LINE-1]]:{{.*}}}
foo(p);
}
More information about the cfe-commits
mailing list