brintos

brintos / llvm-project-archived public Read only

0
0
Text · 937 B · ea46047 Raw
33 lines · c
1// RUN: rm -fR %t2// RUN: mkdir %t3// RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o %t %s4// RUN: ls %t | grep report5 6// D30406: Test new html-single-file output7// RUN: rm -fR %t8// RUN: mkdir %t9// RUN: %clang_analyze_cc1 -analyzer-output=html-single-file -analyzer-checker=core -o %t %s10// RUN: ls %t | grep report11 12// PR16547: Test relative paths13// RUN: cd %t14// RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o testrelative %s15// RUN: ls %t/testrelative | grep report16 17// Currently this test mainly checks that the HTML diagnostics doesn't crash18// when handling macros will calls with macros.  We should actually validate19// the output, but that requires being able to match against a specifically20// generate HTML file.21 22#define DEREF(p) *p = 0xDEADBEEF23 24void has_bug(int *p) {25  DEREF(p);26}27 28#define CALL_HAS_BUG(q) has_bug(q)29 30void test_call_macro(void) {31  CALL_HAS_BUG(0);32}33