blob: 59d81a56a4e91dfd12d9e86612085305737e345c [file] [log] [blame]
Ted Kremenek77d09442012-03-02 01:27:31 +00001// RUN: mkdir %t.dir
2// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T.dir %s
3// RUN: rm -fR %t.dir
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
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}