blob: 1b0f2043b5f80c4cd36bd16f75e1dc5546664656 [file] [log] [blame]
Ted Kremenek13eee192011-12-07 02:08:00 +00001#error foo
2#error bar
3
4// RUN: rm -f %t
Richard Smith9867eba2012-12-05 22:33:14 +00005// RUN: not %clang -ferror-limit=1 -fsyntax-only %s --serialize-diagnostics %t > /dev/null 2>&1
Ted Kremenek13eee192011-12-07 02:08:00 +00006// RUN: c-index-test -read-diagnostics %t 2>&1 | FileCheck %s
7
8// This test case tests that we can handle both fatal errors and errors without categories.
9
Ted Kremenek34a2c422012-02-02 00:16:13 +000010// CHECK: {{.*[/\\]}}serialized-diags-no-category.c:1:2: error: foo []
Ted Kremenek13eee192011-12-07 02:08:00 +000011// CHECK: Number of diagnostics: 2
12