[clang] [analyzer] Generalize field initializer resolution in RegionStore (PR #189361)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 1 02:31:47 PDT 2026
================
@@ -0,0 +1,183 @@
+// RUN: %clang_analyze_cc1 -xc -analyzer-checker=core,debug.ExprInspection -verify=expected,c %s
+// RUN: %clang_analyze_cc1 -xc++ -DCPP -std=c++14 -analyzer-checker=core,debug.ExprInspection -verify=expected,cpp %s
+
+void clang_analyzer_value(int);
+
+struct CStruct {
+ int a;
+};
+
+struct CStruct nonconst_c_struct_array[1] = {
+ {11},
+};
+
+void use_nonconst_struct_array_c(void) {
+ clang_analyzer_value(nonconst_c_struct_array->a); // expected-warning {{32s:{ [-2147483648, 2147483647] }}}
----------------
steakhal wrote:
I think if we assume about the width of integers, probably we should pin the target triple.
https://github.com/llvm/llvm-project/pull/189361
More information about the cfe-commits
mailing list