Daniel Dunbar | 7665ad8 | 2011-05-05 02:12:02 +0000 | [diff] [blame] | 1 | // RUN: rm -f %t.log |
Daniel Dunbar | f275150 | 2011-04-07 19:05:06 +0000 | [diff] [blame] | 2 | // RUN: env RC_DEBUG_OPTIONS=1 \ |
Daniel Dunbar | 7665ad8 | 2011-05-05 02:12:02 +0000 | [diff] [blame] | 3 | // RUN: CC_LOG_DIAGNOSTICS=1 CC_LOG_DIAGNOSTICS_FILE=%t.log \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 4 | // RUN: %clang -Wfoobar -no-canonical-prefixes -target x86_64-apple-darwin10 -fsyntax-only %s |
Daniel Dunbar | f275150 | 2011-04-07 19:05:06 +0000 | [diff] [blame] | 5 | // RUN: FileCheck %s < %t.log |
| 6 | |
| 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> |
Daniel Dunbar | 7665ad8 | 2011-05-05 02:12:02 +0000 | [diff] [blame] | 19 | // CHECK: <key>message</key> |
Benjamin Kramer | a70cb9d | 2011-11-14 23:30:34 +0000 | [diff] [blame] | 20 | // CHECK: <string>unknown warning option '-Wfoobar'; did you mean '-W{{.*}}'?</string> |
Daniel Dunbar | 7665ad8 | 2011-05-05 02:12:02 +0000 | [diff] [blame] | 21 | // CHECK: </dict> |
| 22 | // CHECK: <dict> |
| 23 | // CHECK: <key>level</key> |
| 24 | // CHECK: <string>warning</string> |
Daniel Dunbar | f275150 | 2011-04-07 19:05:06 +0000 | [diff] [blame] | 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>control reaches end of non-void function</string> |
| 33 | // CHECK: </dict> |
| 34 | // CHECK: </array> |
| 35 | // CHECK: </dict> |