Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / analyzer-checker-option-help.c
blob5f95569e58498ec56be69e4d1706353e5de4a5f4
1 // RUN: %clang_cc1 -analyzer-checker-option-help \
2 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-STABLE
4 // RUN: %clang_cc1 -analyzer-checker-option-help-alpha \
5 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-ALPHA
7 // RUN: %clang_cc1 -analyzer-checker-option-help-developer \
8 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-DEVELOPER
10 // RUN: %clang_cc1 -analyzer-checker-option-help-developer \
11 // RUN: -analyzer-checker-option-help-alpha \
12 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-DEVELOPER-ALPHA
14 // RUN: %clang_cc1 -analyzer-checker-option-help \
15 // RUN: -analyzer-checker-option-help-alpha \
16 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-STABLE-ALPHA
18 // RUN: %clang_cc1 -analyzer-checker-option-help \
19 // RUN: -analyzer-checker-option-help-developer \
20 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-STABLE-DEVELOPER
22 // RUN: %clang_cc1 -analyzer-checker-option-help \
23 // RUN: -analyzer-checker-option-help-alpha \
24 // RUN: -analyzer-checker-option-help-developer \
25 // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-STABLE-ALPHA-DEVELOPER
27 // CHECK-STABLE: OVERVIEW: Clang Static Analyzer Checker and Package Option List
29 // CHECK-STABLE: USAGE: -analyzer-config <OPTION1=VALUE,OPTION2=VALUE,...>
31 // CHECK-STABLE: -analyzer-config OPTION1=VALUE, -analyzer-config
32 // CHECK-STABLE-SAME: OPTION2=VALUE, ...
34 // CHECK-STABLE: OPTIONS:
36 // CHECK-STABLE: cplusplus.Move:WarnOn
37 // CHECK-STABLE-SAME: (string) In non-aggressive mode, only warn
38 // CHECK-STABLLE: on use-after-move of local variables (or
39 // CHECK-STABLLE: local rvalue references) and of STL objects.
40 // CHECK-STABLLE: The former is possible because local variables
41 // CHECK-STABLLE: (or local rvalue references) are not tempting
42 // CHECK-STABLLE: their user to re-use the storage. The latter
43 // CHECK-STABLLE: is possible because STL objects are known
44 // CHECK-STABLLE: to end up in a valid but unspecified state
45 // CHECK-STABLLE: after the move and their state-reset methods
46 // CHECK-STABLLE: are also known, which allows us to predict
47 // CHECK-STABLLE: precisely when use-after-move is invalid.
48 // CHECK-STABLLE: Some STL objects are known to conform to
49 // CHECK-STABLLE: additional contracts after move, so they
50 // CHECK-STABLLE: are not tracked. However, smart pointers
51 // CHECK-STABLLE: specifically are tracked because we can
52 // CHECK-STABLLE: perform extra checking over them. In aggressive
53 // CHECK-STABLLE: mode, warn on any use-after-move because
54 // CHECK-STABLLE: the user has intentionally asked us to completely
55 // CHECK-STABLLE: eliminate use-after-move in his code. Values:
56 // CHECK-STABLLE: "KnownsOnly", "KnownsAndLocals", "All".
57 // CHECK-STABLLE: (default: KnownsAndLocals)
59 // CHECK-STABLE-NOT: debug.AnalysisOrder:*
60 // CHECK-DEVELOPER: debug.AnalysisOrder:*
61 // CHECK-ALPHA-NOT: debug.AnalysisOrder:*
63 // CHECK-STABLE-NOT: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
64 // CHECK-DEVELOPER-NOT: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
65 // CHECK-ALPHA: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
67 // CHECK-STABLE: optin.performance.Padding:AllowedPad
68 // CHECK-DEVELOPER-NOT: optin.performance.Padding:AllowedPad
69 // CHECK-ALPHA-NOT: optin.performance.Padding:AllowedPad
72 // CHECK-STABLE-ALPHA-NOT: debug.AnalysisOrder:*
73 // CHECK-DEVELOPER-ALPHA: debug.AnalysisOrder:*
74 // CHECK-STABLE-DEVELOPER: debug.AnalysisOrder:*
76 // CHECK-STABLE-ALPHA: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
77 // CHECK-DEVELOPER-ALPHA: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
78 // CHECK-STABLE-DEVELOPER-NOT: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
80 // CHECK-STABLE-ALPHA: optin.performance.Padding:AllowedPad
81 // CHECK-DEVELOPER-ALPHA-NOT: optin.performance.Padding:AllowedPad
82 // CHECK-STABLE-DEVELOPER: optin.performance.Padding:AllowedPad
85 // CHECK-STABLE-ALPHA-DEVELOPER: debug.AnalysisOrder:*
86 // CHECK-STABLE-ALPHA-DEVELOPER: optin.cplusplus.UninitializedObject:IgnoreGuardedFields
87 // CHECK-STABLE-ALPHA-DEVELOPER: optin.performance.Padding:AllowedPad