// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s // RUN: FileCheck --input-file %t %s #include "undef-value-callee.h" // This code used to cause a crash since we were not adding fileID of the header to the plist diagnostic. int test_calling_unimportant_callee(int argc, char *argv[]) { int x; callee(); return x; // expected-warning {{Undefined or garbage value returned to caller}} } // CHECK: diagnostics // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: path // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line9 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line9 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line9 // CHECK-NEXT: col7 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: 'x' declared without an initial value // CHECK-NEXT: message // CHECK-NEXT: 'x' declared without an initial value // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line9 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line9 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line10 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line10 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindcontrol // CHECK-NEXT: edges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line10 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line10 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col8 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: ranges // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col10 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: depth0 // CHECK-NEXT: extended_message // CHECK-NEXT: Undefined or garbage value returned to caller // CHECK-NEXT: message // CHECK-NEXT: Undefined or garbage value returned to caller // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: descriptionUndefined or garbage value returned to caller // CHECK-NEXT: categoryLogic error // CHECK-NEXT: typeGarbage return value // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttest_calling_unimportant_callee // CHECK-NEXT: issue_hash3 // CHECK-NEXT: location // CHECK-NEXT: // CHECK-NEXT: line11 // CHECK-NEXT: col3 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: