1 | // RUN: %clang_cc1 %s -emit-html -o - |
2 | |
3 | // rdar://6562329 |
4 | #line 42 "foo.c" |
5 | |
6 | // PR3635 |
7 | #define F(fmt, ...) fmt, ## __VA_ARGS__ |
8 | int main(int argc, char **argv) { |
9 | return F(argc, 1); |
10 | } |
11 | |
12 | // PR3798 |
13 | #define FOR_ALL_FILES(f,i) i |
14 | |
15 | #if 0 |
16 | FOR_ALL_FILES(f) { } |
17 | #endif |
18 | |
19 | // <rdar://problem/11625964> |
20 | // -emit-html filters out # directives, but not _Pragma (or MS __pragma) |
21 | // Diagnostic push/pop is stateful, so re-lexing a file can cause problems |
22 | // if these pragmas are interpreted normally. |
23 | _Pragma("clang diagnostic push") |
24 | _Pragma("clang diagnostic ignored \"-Wformat-extra-args\"") |
25 | _Pragma("clang diagnostic pop") |
26 | |
27 | |