[clang] e2195ff - [analyzer] Fix 'bstring.c' test on Mingw (#192252)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 15 07:12:45 PDT 2026
Author: Balázs Benics
Date: 2026-04-15T15:12:39+01:00
New Revision: e2195ff09dedf0e9eb1148a9fad96229158b75ae
URL: https://github.com/llvm/llvm-project/commit/e2195ff09dedf0e9eb1148a9fad96229158b75ae
DIFF: https://github.com/llvm/llvm-project/commit/e2195ff09dedf0e9eb1148a9fad96229158b75ae.diff
LOG: [analyzer] Fix 'bstring.c' test on Mingw (#192252)
Addresses
https://github.com/llvm/llvm-project/pull/191061#issuecomment-4250948488
Co-authored-by: Martin Storsjö <martin at martin.st>
Added:
Modified:
clang/test/Analysis/bstring.c
Removed:
################################################################################
diff --git a/clang/test/Analysis/bstring.c b/clang/test/Analysis/bstring.c
index f343aaec43307..810241accffa2 100644
--- a/clang/test/Analysis/bstring.c
+++ b/clang/test/Analysis/bstring.c
@@ -539,7 +539,7 @@ void nocrash_on_locint_offset(void *addr, void* from, struct S s) {
void nocrash_on_empty_struct_memcpy(void) {
struct {} a[10];
__builtin_memcpy(&a[2], a, 2); // no-crash
-#if !defined(_WIN32)
+#if !defined(_WIN32) || defined(__MINGW32__)
// expected-warning at -2 {{'memcpy' will always overflow; destination buffer has size 0, but size argument is 2}}
// expected-warning at -3 {{Memory copy function overflows the destination buffer}}
#endif
More information about the cfe-commits
mailing list