================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to