[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / invalid-checker-option.c
blob96bf7b347d1eb89b2b629857e92241d35979ac3b
1 // RUN: not %clang_analyze_cc1 -verify %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-config RetainOneTwoThree:CheckOSObject=false \
4 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-NON-EXISTENT-CHECKER
6 // Note that non-existent packages and checkers were always reported.
8 // RUN: not %clang_analyze_cc1 -verify %s \
9 // RUN: -analyzer-checker=core \
10 // RUN: -analyzer-config-compatibility-mode=true \
11 // RUN: -analyzer-config RetainOneTwoThree:CheckOSObject=false \
12 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-NON-EXISTENT-CHECKER
14 // CHECK-NON-EXISTENT-CHECKER: (frontend): no analyzer checkers or packages
15 // CHECK-NON-EXISTENT-CHECKER-SAME: are associated with 'RetainOneTwoThree'
18 // RUN: %clang_analyze_cc1 -verify %s \
19 // RUN: -analyzer-checker=core \
20 // RUN: -analyzer-checker=debug.ConfigDumper \
21 // RUN: -analyzer-checker=debug.AnalysisOrder \
22 // RUN: -analyzer-config-compatibility-mode=true \
23 // RUN: -analyzer-config debug.AnalysisOrder:*=yesplease \
24 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-CORRECTED-BOOL-VALUE
26 // CHECK-CORRECTED-BOOL-VALUE: debug.AnalysisOrder:* = false
28 // RUN: %clang_analyze_cc1 -verify %s \
29 // RUN: -analyzer-checker=core \
30 // RUN: -analyzer-checker=debug.ConfigDumper \
31 // RUN: -analyzer-checker=optin.performance.Padding \
32 // RUN: -analyzer-config-compatibility-mode=true \
33 // RUN: -analyzer-config optin.performance.Padding:AllowedPad=surpriseme \
34 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-CORRECTED-INT-VALUE
36 // CHECK-CORRECTED-INT-VALUE: optin.performance.Padding:AllowedPad = 24
39 // Every other error should be avoidable in compatiblity mode.
42 // RUN: not %clang_analyze_cc1 -verify %s \
43 // RUN: -analyzer-checker=core \
44 // RUN: -analyzer-config debug.AnalysisOrder:Everything=false \
45 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-NON-EXISTENT-CHECKER-OPTION
47 // CHECK-NON-EXISTENT-CHECKER-OPTION: (frontend): checker 'debug.AnalysisOrder'
48 // CHECK-NON-EXISTENT-CHECKER-OPTION-SAME: has no option called 'Everything'
50 // RUN: %clang_analyze_cc1 -verify %s \
51 // RUN: -analyzer-checker=core \
52 // RUN: -analyzer-config-compatibility-mode=true \
53 // RUN: -analyzer-config debug.AnalysisOrder:Everything=false
56 // RUN: not %clang_analyze_cc1 -verify %s \
57 // RUN: -analyzer-checker=core \
58 // RUN: -analyzer-config debug.AnalysisOrder:*=nothankyou \
59 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-BOOL-VALUE
61 // CHECK-INVALID-BOOL-VALUE: (frontend): invalid input for checker option
62 // CHECK-INVALID-BOOL-VALUE-SAME: 'debug.AnalysisOrder:*', that expects a
63 // CHECK-INVALID-BOOL-VALUE-SAME: boolean value
65 // RUN: %clang_analyze_cc1 -verify %s \
66 // RUN: -analyzer-checker=core \
67 // RUN: -analyzer-config-compatibility-mode=true \
68 // RUN: -analyzer-config debug.AnalysisOrder:*=nothankyou
71 // RUN: not %clang_analyze_cc1 -verify %s \
72 // RUN: -analyzer-checker=core \
73 // RUN: -analyzer-config optin.performance.Padding:AllowedPad=surpriseme \
74 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-INT-VALUE
76 // CHECK-INVALID-INT-VALUE: (frontend): invalid input for checker option
77 // CHECK-INVALID-INT-VALUE-SAME: 'optin.performance.Padding:AllowedPad', that
78 // CHECK-INVALID-INT-VALUE-SAME: expects an integer value
80 // RUN: %clang_analyze_cc1 -verify %s \
81 // RUN: -analyzer-checker=core \
82 // RUN: -analyzer-config-compatibility-mode=true \
83 // RUN: -analyzer-config optin.performance.Padding:AllowedPad=surpriseme
86 // RUN: not %clang_analyze_cc1 -verify %s \
87 // RUN: -analyzer-checker=core \
88 // RUN: -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=sure \
89 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-PACKAGE-VALUE
91 // CHECK-PACKAGE-VALUE: (frontend): invalid input for checker option
92 // CHECK-PACKAGE-VALUE-SAME: 'nullability:NoDiagnoseCallsToSystemHeaders', that
93 // CHECK-PACKAGE-VALUE-SAME: expects a boolean value
95 // expected-no-diagnostics
97 int main(void) {}