blob: 1ec4d18884adaa00c6416de5f32ffd2d7a06e115 [file] [log] [blame]
Richard Smithd515e622012-12-05 06:16:54 +00001// RUN: rm -fR %T/dir
Richard Smitheae57a62012-08-17 04:05:25 +00002// RUN: mkdir %T/dir
3// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T/dir %s
Ted Kremenek77d09442012-03-02 01:27:31 +00004
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
12void has_bug(int *p) {
13 DEREF(p);
14}
15
16#define CALL_HAS_BUG(q) has_bug(q)
17
18void test_call_macro() {
19 CALL_HAS_BUG(0);
20}