blob: 88c99f580de3bda9e1225b201d5e5aa303e4d661 [file] [log] [blame]
Daniel Dunbar7665ad82011-05-05 02:12:02 +00001// RUN: rm -f %t.log
Daniel Dunbarf2751502011-04-07 19:05:06 +00002// RUN: env RC_DEBUG_OPTIONS=1 \
Daniel Dunbar7665ad82011-05-05 02:12:02 +00003// RUN: CC_LOG_DIAGNOSTICS=1 CC_LOG_DIAGNOSTICS_FILE=%t.log \
Sebastian Pop9ec60df2012-01-20 22:01:23 +00004// RUN: %clang -Wfoobar -no-canonical-prefixes -target x86_64-apple-darwin10 -fsyntax-only %s
Daniel Dunbarf2751502011-04-07 19:05:06 +00005// RUN: FileCheck %s < %t.log
6
7int f0() {}
8
9// CHECK: <dict>
10// CHECK: <key>main-file</key>
11// CHECK: <string>{{.*}}cc-log-diagnostics.c</string>
12// CHECK: <key>dwarf-debug-flags</key>
13// CHECK: <string>{{.*}}clang{{.*}}-fsyntax-only{{.*}}</string>
14// CHECK: <key>diagnostics</key>
15// CHECK: <array>
16// CHECK: <dict>
17// CHECK: <key>level</key>
18// CHECK: <string>warning</string>
Daniel Dunbar7665ad82011-05-05 02:12:02 +000019// CHECK: <key>message</key>
Benjamin Kramera70cb9d2011-11-14 23:30:34 +000020// CHECK: <string>unknown warning option &apos;-Wfoobar&apos;; did you mean &apos;-W{{.*}}&apos;?</string>
Daniel Dunbar7665ad82011-05-05 02:12:02 +000021// CHECK: </dict>
22// CHECK: <dict>
23// CHECK: <key>level</key>
24// CHECK: <string>warning</string>
Daniel Dunbarf2751502011-04-07 19:05:06 +000025// CHECK: <key>filename</key>
26// CHECK: <string>{{.*}}cc-log-diagnostics.c</string>
27// CHECK: <key>line</key>
28// CHECK: <integer>7</integer>
29// CHECK: <key>column</key>
30// CHECK: <integer>11</integer>
31// CHECK: <key>message</key>
32// CHECK: <string>control reaches end of non-void function</string>
33// CHECK: </dict>
34// CHECK: </array>
35// CHECK: </dict>