[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed May 7 02:50:19 PDT 2025
================
@@ -0,0 +1,50 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS
+// UNSUPPORTED: system-windows
+// expected-no-diagnostics
+
+// This test reproduces the issue that previously the static analyzer
+// initialized an [[__no_unique_address__]] empty field to zero,
----------------
steakhal wrote:
```suggestion
// initialized an [[no_unique_address]] empty field to zero,
```
https://github.com/llvm/llvm-project/pull/138594
More information about the cfe-commits
mailing list