[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / diagnostics / report-issues-within-main-file.cpp
blob5937affc42b1bebd4a38062447b45ab1f1113e6f
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -analyzer-output=plist-multi-file -analyzer-config report-in-main-source-file=true %s -o %t.plist
2 // RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist -
3 #include "Inputs/include/report-issues-within-main-file.h"
5 void mainPlusHeader() {
6 auto_ptr<int> B (new int[5]);
9 void auxInMain() {
10 int j = 0;
11 j++;
12 cause_div_by_zero_in_header(j);
13 j--;
15 void mainPlusMainPlusHeader() {
16 int i = 0;
17 i++;
18 auxInMain();
19 i++;
22 void causeDivByZeroInMain(int in) {
23 int m = 0;
24 m = in/m;
25 m++;
27 void mainPlusMain() {
28 int i = 0;
29 i++;
30 causeDivByZeroInMain(i);
31 i++;
34 void causeDivByZeroInMain2(int in) {
35 int m2 = 0;
36 m2 = in/m2;
37 m2++;
40 void mainPlustHeaderCallAndReturnPlusMain() {
41 int i = 0;
42 i++;
43 do_something(i);
44 causeDivByZeroInMain2(i);
45 i++;
48 void callInMacro() {
49 int j = 0;
50 j++;
51 CALLS_BUGGY_FUNCTION2;
52 j--;
55 void callInMacro3() {
56 int j = 0;
57 j++;
58 CALLS_BUGGY_FUNCTION3;
59 j--;
62 void callCallInMacro3() {
63 callInMacro3();
66 void callInMacroArg() {
67 int j = 0;
68 j++;
69 TAKE_CALL_AS_ARG(cause_div_by_zero_in_header4(5));
70 j--;