================
@@ -0,0 +1,36 @@
+// RUN: %clang_analyze_cc1 -std=c++14 
-analyzer-checker=core,debug.ExprInspection -verify %s
+
+// This test verifies that the analyzer does not incorrectly assume zero
+// for fields with in-class (default member) initializers when accessing
+// elements of a struct array.
----------------
steakhal wrote:

I think a single test file would better demonstrate the differences between how 
C and C++ global variables are interpreted.
I think you should just have different verify prefixes and two RUN lines. One 
for C and one for C++.
Then the `clang_analyzer_value` would demonstrate nicely if the global 
initializer expression was taken into account or not.

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