Richard Smith | d515e62 | 2012-12-05 06:16:54 +0000 | [diff] [blame] | 1 | // RUN: rm -fR %T/dir |
Richard Smith | eae57a6 | 2012-08-17 04:05:25 +0000 | [diff] [blame] | 2 | // RUN: mkdir %T/dir |
| 3 | // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T/dir %s |
Ted Kremenek | 77d0944 | 2012-03-02 01:27:31 +0000 | [diff] [blame] | 4 | |
| 5 | // Currently this test mainly checks that the HTML diagnostics doesn't crash |
| 6 | // when handling macros will calls with macros. We should actually validate |
| 7 | // the output, but that requires being able to match against a specifically |
| 8 | // generate HTML file. |
| 9 | |
| 10 | #define DEREF(p) *p = 0xDEADBEEF |
| 11 | |
| 12 | void has_bug(int *p) { |
| 13 | DEREF(p); |
| 14 | } |
| 15 | |
| 16 | #define CALL_HAS_BUG(q) has_bug(q) |
| 17 | |
| 18 | void test_call_macro() { |
| 19 | CALL_HAS_BUG(0); |
| 20 | } |