[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / html-diags.c
blobea460478f4e68ca24c69fc43177785aaf178ad92
1 // RUN: rm -fR %t
2 // RUN: mkdir %t
3 // RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o %t %s
4 // RUN: ls %t | grep report
6 // D30406: Test new html-single-file output
7 // RUN: rm -fR %t
8 // RUN: mkdir %t
9 // RUN: %clang_analyze_cc1 -analyzer-output=html-single-file -analyzer-checker=core -o %t %s
10 // RUN: ls %t | grep report
12 // PR16547: Test relative paths
13 // RUN: cd %t
14 // RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o testrelative %s
15 // RUN: ls %t/testrelative | grep report
17 // Currently this test mainly checks that the HTML diagnostics doesn't crash
18 // when handling macros will calls with macros. We should actually validate
19 // the output, but that requires being able to match against a specifically
20 // generate HTML file.
22 #define DEREF(p) *p = 0xDEADBEEF
24 void has_bug(int *p) {
25 DEREF(p);
28 #define CALL_HAS_BUG(q) has_bug(q)
30 void test_call_macro(void) {
31 CALL_HAS_BUG(0);