1 // RUN: rm -f %t.log
2 // RUN: env RC_DEBUG_OPTIONS=1 \
3 // RUN:     CC_LOG_DIAGNOSTICS=1 CC_LOG_DIAGNOSTICS_FILE=%t.log \
4 // RUN: %clang -Wfoobar -no-canonical-prefixes -target x86_64-apple-darwin10 -fsyntax-only %s
5 // RUN: FileCheck %s < %t.log
6 
f0()7 int 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>
19 // CHECK:       <key>message</key>
20 // CHECK:       <string>unknown warning option &apos;-Wfoobar&apos;; did you mean &apos;-W{{.*}}&apos;?</string>
21 // CHECK:     </dict>
22 // CHECK:     <dict>
23 // CHECK:       <key>level</key>
24 // CHECK:       <string>warning</string>
25 // 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>non-void function does not return a value</string>
33 // CHECK:     </dict>
34 // CHECK:   </array>
35 // CHECK: </dict>
36