Index: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -73,7 +73,7 @@
const Preprocessor &PP) {
createHTMLDiagnosticConsumer(AnalyzerOpts, C,
llvm::sys::path::parent_path(prefix), PP);
- createPlistDiagnosticConsumer(AnalyzerOpts, C, prefix, PP);
+ createPlistMultiFileDiagnosticConsumer(AnalyzerOpts, C, prefix, PP);
}
void ento::createTextPathDiagnosticConsumer(AnalyzerOptions &AnalyzerOpts,
Index: cfe/trunk/test/Analysis/diagnostics/plist-multi-file.h
===================================================================
--- cfe/trunk/test/Analysis/diagnostics/plist-multi-file.h
+++ cfe/trunk/test/Analysis/diagnostics/plist-multi-file.h
@@ -0,0 +1,3 @@
+void foo(int *ptr) {
+ *ptr = 1; // expected-warning{{Dereference of null pointer (loaded from variable 'ptr')}}
+}
Index: cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c
===================================================================
--- cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c
+++ cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c
@@ -0,0 +1,205 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-html -o %t.plist -verify %s
+// RUN: FileCheck --input-file=%t.plist %s
+
+#include "plist-multi-file.h"
+
+void bar() {
+ foo(0);
+}
+
+// CHECK: diagnostics
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: path
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: kindevent
+// CHECK-NEXT: location
+// CHECK-NEXT:
+// CHECK-NEXT: line7
+// CHECK-NEXT: col7
+// CHECK-NEXT: file0
+// CHECK-NEXT:
+// CHECK-NEXT: ranges
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line7
+// CHECK-NEXT: col7
+// CHECK-NEXT: file0
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line7
+// CHECK-NEXT: col7
+// CHECK-NEXT: file0
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: depth0
+// CHECK-NEXT: extended_message
+// CHECK-NEXT: Passing null pointer value via 1st parameter 'ptr'
+// CHECK-NEXT: message
+// CHECK-NEXT: Passing null pointer value via 1st parameter 'ptr'
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: kindevent
+// CHECK-NEXT: location
+// CHECK-NEXT:
+// CHECK-NEXT: line7
+// CHECK-NEXT: col3
+// CHECK-NEXT: file0
+// CHECK-NEXT:
+// CHECK-NEXT: ranges
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line7
+// CHECK-NEXT: col3
+// CHECK-NEXT: file0
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line7
+// CHECK-NEXT: col8
+// CHECK-NEXT: file0
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: depth0
+// CHECK-NEXT: extended_message
+// CHECK-NEXT: Calling 'foo'
+// CHECK-NEXT: message
+// CHECK-NEXT: Calling 'foo'
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: kindevent
+// CHECK-NEXT: location
+// CHECK-NEXT:
+// CHECK-NEXT: line1
+// CHECK-NEXT: col1
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT: depth1
+// CHECK-NEXT: extended_message
+// CHECK-NEXT: Entered call from 'bar'
+// CHECK-NEXT: message
+// CHECK-NEXT: Entered call from 'bar'
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: kindcontrol
+// CHECK-NEXT: edges
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: start
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line1
+// CHECK-NEXT: col1
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line1
+// CHECK-NEXT: col4
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: end
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col3
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col3
+// CHECK-NEXT: file1
+// 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: line2
+// CHECK-NEXT: col3
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col3
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: end
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col8
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col8
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: kindevent
+// CHECK-NEXT: location
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col8
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT: ranges
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col4
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col6
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: depth1
+// CHECK-NEXT: extended_message
+// CHECK-NEXT: Dereference of null pointer (loaded from variable 'ptr')
+// CHECK-NEXT: message
+// CHECK-NEXT: Dereference of null pointer (loaded from variable 'ptr')
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: descriptionDereference of null pointer (loaded from variable 'ptr')
+// CHECK-NEXT: categoryLogic error
+// CHECK-NEXT: typeDereference of null pointer
+// CHECK-NEXT: check_namecore.NullDereference
+// CHECK-NEXT:
+// CHECK-NEXT: issue_hash_content_of_line_in_context2058c95994cab381890af28e7bf354bf
+// CHECK-NEXT: issue_context_kindfunction
+// CHECK-NEXT: issue_contextfoo
+// CHECK-NEXT: issue_hash_function_offset1
+// CHECK-NEXT: location
+// CHECK-NEXT:
+// CHECK-NEXT: line2
+// CHECK-NEXT: col8
+// CHECK-NEXT: file1
+// CHECK-NEXT:
+// CHECK-NEXT: HTMLDiagnostics_files
+// CHECK-NEXT:
+// CHECK-NEXT: report-{{([0-9a-f]{6})}}.html
+// CHECK-NEXT:
+// CHECK-NEXT:
+// CHECK-NEXT: