r362011 - [analyzer] print() JSONify chain: Generic stmt_id

Csaba Dabis via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 11:58:42 PDT 2019


Author: charusso
Date: Wed May 29 11:58:41 2019
New Revision: 362011

URL: http://llvm.org/viewvc/llvm-project?rev=362011&view=rev
Log:
[analyzer] print() JSONify chain: Generic stmt_id

Summary: Some environment create less statements so make them generic.

Modified:
    cfe/trunk/test/Analysis/dump_egraph.cpp
    cfe/trunk/test/Analysis/expr-inspection.c

Modified: cfe/trunk/test/Analysis/dump_egraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dump_egraph.cpp?rev=362011&r1=362010&r2=362011&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/dump_egraph.cpp (original)
+++ cfe/trunk/test/Analysis/dump_egraph.cpp Wed May 29 11:58:41 2019
@@ -16,9 +16,9 @@ void foo() {
   T t;
 }
 
-// CHECK: \"constructing_objects\": [\l      \{ \"location_context\": \"#0 Call\", \"calling\": \"foo\", \"call_line\": null, \"items\": [\l        \{ \"lctx_id\": 1, \"stmt_id\": 1155, \"kind\": \"construct into local variable\", \"argument_index\": null, \"pretty\": \"T t;\", \"value\": \"&t\"
+// CHECK: \"constructing_objects\": [\l      \{ \"location_context\": \"#0 Call\", \"calling\": \"foo\", \"call_line\": null, \"items\": [\l        \{ \"lctx_id\": 1, \"stmt_id\": {{[0-9]+}}, \"kind\": \"construct into local variable\", \"argument_index\": null, \"pretty\": \"T t;\", \"value\": \"&t\"
 
-// CHECK: \"constructing_objects\": [\l      \{ \"location_context\": \"#0 Call\", \"calling\": \"T::T\", \"call_line\": \"16\", \"items\": [\l        \{ \"lctx_id\": 2, \"init_id\": 1092, \"kind\": \"construct into member variable\", \"argument_index\": null, \"pretty\": \"s\", \"value\": \"&t-\>s\"
+// CHECK: \"constructing_objects\": [\l      \{ \"location_context\": \"#0 Call\", \"calling\": \"T::T\", \"call_line\": \"16\", \"items\": [\l        \{ \"lctx_id\": 2, \"init_id\": {{[0-9]+}}, \"kind\": \"construct into member variable\", \"argument_index\": null, \"pretty\": \"s\", \"value\": \"&t-\>s\"
 
 // CHECK: \"store\": [\l      \{ \"cluster\": \"t\", \"items\": [\l        \{ \"kind\": \"Default\", \"offset\": 0, \"value\": \"conj_$3\{int, LC3, no stmt, #1\}\"
 

Modified: cfe/trunk/test/Analysis/expr-inspection.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/expr-inspection.c?rev=362011&r1=362010&r2=362011&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/expr-inspection.c (original)
+++ cfe/trunk/test/Analysis/expr-inspection.c Wed May 29 11:58:41 2019
@@ -31,7 +31,7 @@ void foo(int x) {
 // CHECK-NEXT:   ],
 // CHECK-NEXT:   "environment": [
 // CHECK-NEXT:     { "location_context": "#0 Call", "calling": "foo", "call_line": null, "items": [
-// CHECK-NEXT:       { "lctx_id": 1, "stmt_id": 847, "pretty": "clang_analyzer_printState", "value": "&code{clang_analyzer_printState}" }
+// CHECK-NEXT:       { "lctx_id": 1, "stmt_id": {{[0-9]+}}, "pretty": "clang_analyzer_printState", "value": "&code{clang_analyzer_printState}" }
 // CHECK-NEXT:     ]}
 // CHECK-NEXT:   ],
 // CHECK-NEXT:   "constraints": [




More information about the cfe-commits mailing list