blob: 83bda14d4f2f7df2cd973710d4487360ee53451a [file] [log] [blame]
Artem Dergachev482e2362020-02-04 22:48:19 +03001// RUN: rm -fR %t
2// RUN: mkdir %t
3// RUN: %clang_analyze_cc1 -analyzer-checker=core \
4// RUN: -analyzer-output=html -o %t -verify %s
5// RUN: cat %t/report-*.html | FileCheck %s
6
7void bar(int);
8
9#define MACRO if (b)
10
11void foo2() {
12 int a;
13 int b = 1;
14 MACRO
15 bar(a); // expected-warning{{1st function call argument is an uninitialized value}}
16}
17
18// For now we don't emit popups inside macros due to UI limitations.
19// Once we do, we should test it thoroughly.
20
21// CHECK-LABEL: <tr class="codeline" data-linenumber="14">
22// CHECK-NOT: <span class='variable'>
23// CHECK-SAME: <span class='macro'>
24// CHECK-SAME: MACRO
25// CHECK-SAME: <span class='macro_popup'>
26// CHECK-SAME: if (b)
27// CHECK-SAME: </span>
28// CHECK-SAME: </span>