[clang] [NFC][analyzer] Use %clang_analyze_cc1 consistently (PR #145895)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 26 06:48:34 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-static-analyzer-1

Author: DonĂ¡t Nagy (NagyDonat)

<details>
<summary>Changes</summary>

A large majority of the LIT tests of the clang static analyzer use RUN lines with the placeholder `%clang_analyze_cc1` which expands to `%clang_cc1 -analyze -setup-static-analyzer` where the only effect of `-setup-static-analyzer` is that it ensures that the macro `__clang_analyzer__` is defined. However, there were some tests that used `%clang_cc1 -analyze` directly; this commit changes those to using `%clang_analyze_cc1` for the sake of consistency.

Previously `%clang_analyze_cc1` did not work within the directory `exploded-graph-rewriter` (because that directory has its own custom `lit.local.cfg`) but this problem was eliminated by the recent commit 40cc4379cda6e0d6efe72c55d1968f9cf427a16a, so it was possible to resolve and delete the FIXME comments asking for this change.

There are a few tests that use `%clang --analyze` or other command-line flags (e.g. help flags), those are not affected by this change.

This cleanup was discussed in the discourse thread https://discourse.llvm.org/t/taking-ownership-of-clang-test-analysis/84689/11

---

Patch is 25.97 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/145895.diff


39 Files Affected:

- (modified) clang/test/Analysis/ArrayDelete.cpp (+1-1) 
- (modified) clang/test/Analysis/DeleteWithNonVirtualDtor.cpp (+1-1) 
- (modified) clang/test/Analysis/PR37855.c (+2-2) 
- (modified) clang/test/Analysis/aggrinit-cfg-output.cpp (+1-1) 
- (modified) clang/test/Analysis/compound-literals.c (+1-1) 
- (modified) clang/test/Analysis/ctu-cxxdefaultinitexpr.cpp (+1-1) 
- (modified) clang/test/Analysis/ctu-implicit.c (+1-1) 
- (modified) clang/test/Analysis/ctu-import-threshold.c (+2-2) 
- (modified) clang/test/Analysis/ctu-lookup-name-with-space.cpp (+1-1) 
- (modified) clang/test/Analysis/ctu-main.c (+2-2) 
- (modified) clang/test/Analysis/ctu-on-demand-parsing.c (+1-1) 
- (modified) clang/test/Analysis/ctu-test-import-failure.cpp (+1-1) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp (+3-4) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/escapes.c (+3-4) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/initializers_under_construction.cpp (+3-4) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp (+3-4) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/macros.c (+3-4) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/objects_under_construction.cpp (+4-5) 
- (modified) clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp (+3-4) 
- (modified) clang/test/Analysis/gmalloc.c (+1-1) 
- (modified) clang/test/Analysis/handle_constructors_for_default_arguments.cpp (+1-1) 
- (modified) clang/test/Analysis/handle_constructors_with_new_array.cpp (+1-1) 
- (modified) clang/test/Analysis/initialization.c (+1-1) 
- (modified) clang/test/Analysis/initialization.cpp (+1-1) 
- (modified) clang/test/Analysis/lifetime-cfg-output.cpp (+1-1) 
- (modified) clang/test/Analysis/loopexit-cfg-output.cpp (+1-1) 
- (modified) clang/test/Analysis/method-arg-decay.m (+1-1) 
- (modified) clang/test/Analysis/null-deref-static.m (+1-1) 
- (modified) clang/test/Analysis/objc-encode.m (+1-1) 
- (modified) clang/test/Analysis/openmp-unsupported.c (+1-1) 
- (modified) clang/test/Analysis/pointer-escape-on-conservative-calls.c (+1-1) 
- (modified) clang/test/Analysis/scopes-cfg-output.cpp (+1-1) 
- (modified) clang/test/Analysis/taint-diagnostic-visitor.c (+1-1) 
- (modified) clang/test/Analysis/temporaries-callback-order.cpp (+1-1) 
- (modified) clang/test/Analysis/undef-call.c (+1-1) 
- (modified) clang/test/Analysis/z3-crosscheck-max-attempts.cpp (+1-1) 
- (modified) clang/test/Analysis/z3-crosscheck.c (+2-2) 
- (modified) clang/test/Analysis/z3/D83660.c (+1-1) 
- (modified) clang/test/Analysis/z3/pretty-dump.c (+1-1) 


``````````diff
diff --git a/clang/test/Analysis/ArrayDelete.cpp b/clang/test/Analysis/ArrayDelete.cpp
index 6887e0a35fb8b..2710fa1e1e112 100644
--- a/clang/test/Analysis/ArrayDelete.cpp
+++ b/clang/test/Analysis/ArrayDelete.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.ArrayDelete -std=c++11 -verify -analyzer-output=text %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.ArrayDelete -std=c++11 -verify -analyzer-output=text %s
 
 struct Base {
     virtual ~Base() = default;
diff --git a/clang/test/Analysis/DeleteWithNonVirtualDtor.cpp b/clang/test/Analysis/DeleteWithNonVirtualDtor.cpp
index 2809f3758eee1..68ae1aee2e289 100644
--- a/clang/test/Analysis/DeleteWithNonVirtualDtor.cpp
+++ b/clang/test/Analysis/DeleteWithNonVirtualDtor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.cplusplus.DeleteWithNonVirtualDtor -std=c++11 -verify -analyzer-output=text %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.cplusplus.DeleteWithNonVirtualDtor -std=c++11 -verify -analyzer-output=text %s
 
 struct Virtual {
   virtual ~Virtual() {}
diff --git a/clang/test/Analysis/PR37855.c b/clang/test/Analysis/PR37855.c
index e08ce8f250f86..434df576e8ece 100644
--- a/clang/test/Analysis/PR37855.c
+++ b/clang/test/Analysis/PR37855.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=core -w -DNO_CROSSCHECK -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=core -w -analyzer-config crosscheck-with-z3=true -verify %s
 // REQUIRES: z3
 
 // XFAIL: *
diff --git a/clang/test/Analysis/aggrinit-cfg-output.cpp b/clang/test/Analysis/aggrinit-cfg-output.cpp
index 2e95a7f9e24fe..682399399d21d 100644
--- a/clang/test/Analysis/aggrinit-cfg-output.cpp
+++ b/clang/test/Analysis/aggrinit-cfg-output.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-expand-default-aggr-inits=true %s > %t 2>&1
+// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config cfg-expand-default-aggr-inits=true %s > %t 2>&1
 // RUN: FileCheck --input-file=%t %s
 
 static char a[] = "foobar";
diff --git a/clang/test/Analysis/compound-literals.c b/clang/test/Analysis/compound-literals.c
index c74eacc3aa683..90ef0ceb46b2e 100644
--- a/clang/test/Analysis/compound-literals.c
+++ b/clang/test/Analysis/compound-literals.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple=i386-apple-darwin10 -verify %s -analyze \
+// RUN: %clang_analyze_cc1 -triple=i386-apple-darwin10 -verify %s \
 // RUN:   -analyzer-checker=debug.ExprInspection
 
 #define NULL 0
diff --git a/clang/test/Analysis/ctu-cxxdefaultinitexpr.cpp b/clang/test/Analysis/ctu-cxxdefaultinitexpr.cpp
index 18f03ee6b0101..995db5614527c 100644
--- a/clang/test/Analysis/ctu-cxxdefaultinitexpr.cpp
+++ b/clang/test/Analysis/ctu-cxxdefaultinitexpr.cpp
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++17 \
 // RUN:   -emit-pch -o %t/ctudir/ctu-cxxdefaultinitexpr-import.cpp.ast %S/Inputs/ctu-cxxdefaultinitexpr-import.cpp
 // RUN: cp %S/Inputs/ctu-cxxdefaultinitexpr-import.cpp.externalDefMap.ast-dump.txt %t/ctudir/externalDefMap.txt
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++17 -analyze \
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -std=c++17 \
 // RUN:   -analyzer-checker=core \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
 // RUN:   -analyzer-config ctu-dir=%t/ctudir \
diff --git a/clang/test/Analysis/ctu-implicit.c b/clang/test/Analysis/ctu-implicit.c
index c0b28fc25bd25..63df5fb0542b1 100644
--- a/clang/test/Analysis/ctu-implicit.c
+++ b/clang/test/Analysis/ctu-implicit.c
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1  \
 // RUN:   -emit-pch -o %t/ctudir2/ctu-import.c.ast %S/Inputs/ctu-import.c
 // RUN: cp %S/Inputs/ctu-import.c.externalDefMap.ast-dump.txt %t/ctudir2/externalDefMap.txt
-// RUN: %clang_cc1 -analyze \
+// RUN: %clang_analyze_cc1 \
 // RUN:   -analyzer-checker=core,debug.ExprInspection \
 // RUN:   -analyzer-config eagerly-assume=false \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
diff --git a/clang/test/Analysis/ctu-import-threshold.c b/clang/test/Analysis/ctu-import-threshold.c
index 62bbeda20d5ba..f7e1285d595ea 100644
--- a/clang/test/Analysis/ctu-import-threshold.c
+++ b/clang/test/Analysis/ctu-import-threshold.c
@@ -1,6 +1,6 @@
 // Ensure analyzer option 'ctu-import-threshold' is a recognized option.
 //
-// RUN: %clang_cc1 -analyze -analyzer-config ctu-import-threshold=30 -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-config ctu-import-cpp-threshold=30 -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-config ctu-import-threshold=30 -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-config ctu-import-cpp-threshold=30 -verify %s
 //
 // expected-no-diagnostics
diff --git a/clang/test/Analysis/ctu-lookup-name-with-space.cpp b/clang/test/Analysis/ctu-lookup-name-with-space.cpp
index ef733d5c52e3d..0761cfe092296 100644
--- a/clang/test/Analysis/ctu-lookup-name-with-space.cpp
+++ b/clang/test/Analysis/ctu-lookup-name-with-space.cpp
@@ -7,7 +7,7 @@
 // RUN: %clang_cc1 -emit-pch %/S/Inputs/ctu-lookup-name-with-space.cpp -o %t/importee.ast
 
 // RUN: cd %t
-// RUN: %clang_cc1 -analyze \
+// RUN: %clang_analyze_cc1 \
 // RUN:   -analyzer-checker=core \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
 // RUN:   -analyzer-config ctu-dir=. \
diff --git a/clang/test/Analysis/ctu-main.c b/clang/test/Analysis/ctu-main.c
index 0193a7e6d135d..e24510e8aadc4 100644
--- a/clang/test/Analysis/ctu-main.c
+++ b/clang/test/Analysis/ctu-main.c
@@ -4,7 +4,7 @@
 // RUN:   -emit-pch -o %t/ctudir2/ctu-other.c.ast %S/Inputs/ctu-other.c
 // RUN: cp %S/Inputs/ctu-other.c.externalDefMap.ast-dump.txt %t/ctudir2/externalDefMap.txt
 
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c89 -analyze \
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -std=c89 \
 // RUN:   -analyzer-checker=core,debug.ExprInspection \
 // RUN:   -analyzer-config eagerly-assume=false \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
@@ -14,7 +14,7 @@
 
 // Simulate the behavior of the previous CTU implementation by inlining all
 // functions during the first phase. This way, the second phase is a noop.
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c89 -analyze \
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -std=c89 \
 // RUN:   -analyzer-checker=core,debug.ExprInspection \
 // RUN:   -analyzer-config eagerly-assume=false \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
diff --git a/clang/test/Analysis/ctu-on-demand-parsing.c b/clang/test/Analysis/ctu-on-demand-parsing.c
index 17ade150ded5e..2107b989d9cc3 100644
--- a/clang/test/Analysis/ctu-on-demand-parsing.c
+++ b/clang/test/Analysis/ctu-on-demand-parsing.c
@@ -11,7 +11,7 @@
 //
 // RUN: cd "%t" && %clang_extdef_map "%t/ctu-other.c" > externalDefMap.txt
 //
-// RUN: cd "%t" && %clang_cc1 -std=c89 -analyze \
+// RUN: cd "%t" && %clang_analyze_cc1 -std=c89 \
 // RUN:   -analyzer-checker=core,debug.ExprInspection \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
 // RUN:   -analyzer-config ctu-dir=. \
diff --git a/clang/test/Analysis/ctu-test-import-failure.cpp b/clang/test/Analysis/ctu-test-import-failure.cpp
index 2295a66538fc9..812fa01b6c67f 100644
--- a/clang/test/Analysis/ctu-test-import-failure.cpp
+++ b/clang/test/Analysis/ctu-test-import-failure.cpp
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++17 \
 // RUN:   -emit-pch -o %t/ctudir/ctu-test-import-failure-import.cpp.ast %S/Inputs/ctu-test-import-failure-import.cpp
 // RUN: cp %S/Inputs/ctu-test-import-failure-import.cpp.externalDefMap.ast-dump.txt %t/ctudir/externalDefMap.txt
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++17 -analyze \
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -std=c++17 \
 // RUN:   -analyzer-checker=core \
 // RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
 // RUN:   -analyzer-config ctu-dir=%t/ctudir \
diff --git a/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp b/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp
index 01914a86ad4a5..76e67a8690bd9 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp
+++ b/clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp
@@ -1,7 +1,6 @@
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
 
 struct S {};
diff --git a/clang/test/Analysis/exploded-graph-rewriter/escapes.c b/clang/test/Analysis/exploded-graph-rewriter/escapes.c
index 830e082730a84..a3a6868cf8dfa 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/escapes.c
+++ b/clang/test/Analysis/exploded-graph-rewriter/escapes.c
@@ -1,7 +1,6 @@
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
 
 void escapes(void) {
diff --git a/clang/test/Analysis/exploded-graph-rewriter/initializers_under_construction.cpp b/clang/test/Analysis/exploded-graph-rewriter/initializers_under_construction.cpp
index 82b7f3269f318..52f23e298ec55 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/initializers_under_construction.cpp
+++ b/clang/test/Analysis/exploded-graph-rewriter/initializers_under_construction.cpp
@@ -1,7 +1,6 @@
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
 
 struct A {
diff --git a/clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp b/clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
index f18c4c5afe147..3798846c8873e 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
+++ b/clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
@@ -1,8 +1,7 @@
 // CAUTION: The name of this file should start with `l` for proper tests.
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
 
 void test1() {
diff --git a/clang/test/Analysis/exploded-graph-rewriter/macros.c b/clang/test/Analysis/exploded-graph-rewriter/macros.c
index f47342fc524b7..32b8d55d553e9 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/macros.c
+++ b/clang/test/Analysis/exploded-graph-rewriter/macros.c
@@ -6,10 +6,9 @@ void *foo(void) {
 // The code above shall go first, because check tags below are sensetive to the line numbers on which the code is placed.
 // You can change lines below in the way you need.
 
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
 
 // CHECK: macros.c:<b>3</b>:<b>10</b>
diff --git a/clang/test/Analysis/exploded-graph-rewriter/objects_under_construction.cpp b/clang/test/Analysis/exploded-graph-rewriter/objects_under_construction.cpp
index f2628ee686632..145a56c1c44f9 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/objects_under_construction.cpp
+++ b/clang/test/Analysis/exploded-graph-rewriter/objects_under_construction.cpp
@@ -1,8 +1,7 @@
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -std=c++14 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyze-function "test()" \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyze-function "test()" \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
 
 struct S {
diff --git a/clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp b/clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp
index 5b955a0aae3ec..2c1c934d264f5 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp
+++ b/clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp
@@ -1,7 +1,6 @@
-// FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
-// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
-// RUN:                     -analyzer-checker=core \
-// RUN:                     -analyzer-dump-egraph=%t.dot %s
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN:                    -analyzer-checker=core \
+// RUN:                    -analyzer-dump-egraph=%t.dot %s
 // RUN: %exploded_graph_rewriter --verbose %t.dot 2>&1 | FileCheck %s
 // REQUIRES: system-windows
 
diff --git a/clang/test/Analysis/gmalloc.c b/clang/test/Analysis/gmalloc.c
index 279e2ae844b78..dae28ebfa910c 100644
--- a/clang/test/Analysis/gmalloc.c
+++ b/clang/test/Analysis/gmalloc.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc -verify %s
 
 #include "Inputs/system-header-simulator.h"
 
diff --git a/clang/test/Analysis/handle_constructors_for_default_arguments.cpp b/clang/test/Analysis/handle_constructors_for_default_arguments.cpp
index e20ec5e57d3a4..2a934be2e8d34 100644
--- a/clang/test/Analysis/handle_constructors_for_default_arguments.cpp
+++ b/clang/test/Analysis/handle_constructors_for_default_arguments.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze \
+// RUN: %clang_analyze_cc1 \
 // RUN:   -analyzer-checker=core,debug.ExprInspection %s -verify
 
 // These test cases demonstrate lack of Static Analyzer features.
diff --git a/clang/test/Analysis/handle_constructors_with_new_array.cpp b/clang/test/Analysis/handle_constructors_with_new_array.cpp
index d55d354f9c5cc..4acdaaf454903 100644
--- a/clang/test/Analysis/handle_constructors_with_new_array.cpp
+++ b/clang/test/Analysis/handle_constructors_with_new_array.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze \
+// RUN: %clang_analyze_cc1 \
 // RUN:   -analyzer-checker=core,debug.ExprInspection %s -verify
 
 // These test cases demonstrate lack of Static Analyzer features.
diff --git a/clang/test/Analysis/initialization.c b/clang/test/Analysis/initialization.c
index bd003b721d91d..32bdf733bcb98 100644
--- a/clang/test/Analysis/initialization.c
+++ b/clang/test/Analysis/initialization.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-config eagerly-assume=false  -analyzer-checker=core.uninitialized.Assign,debug.ExprInspection -verify %s
+// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -analyzer-config eagerly-assume=false  -analyzer-checker=core.uninitialized.Assign,debug.ExprInspection -verify %s
 
 void clang_analyzer_eval(int);
 
diff --git a/clang/test/Analysis/initialization.cpp b/clang/test/Analysis/initialization.cpp
index e5e19daad0895..d064dd6172d63 100644
--- a/clang/test/Analysis/initialization.cpp
+++ b/clang/test/Analysis/initialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++14 -triple i386-apple-darwin10 -analyze -analyzer-config eagerly-assume=false -analyzer-checker=core.uninitialized.Assign,core.builtin,debug.ExprInspection,core.uninitialized.UndefReturn -verify %s
+// RUN: %clang_analyze_cc1 -std=c++14 -triple i386-apple-darwin10 -analyzer-config eagerly-assume=false -analyzer-checker=core.uninitialized.Assign,core.builtin,debug.ExprInspection,core.uninitialized.UndefReturn -verify %s
 
 template <typename T>
 void clang_analyzer_dump(T x);
diff --git a/clang/test/Analysis/lifetime-cfg-output.cpp b/clang/test/Analysis/lifetime-cfg-output.cpp
index d8b8dc4a71d4a..0a75c5bcc0bcc 100644
--- a/clang/test/Analysis/lifetime-cfg-output.cpp
+++ b/clang/test/Analysis/lifetime-cfg-output.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-lifetime=true %s > %t 2>&1
+// RUN: %clang_analyze_cc1 -fcxx-exceptions -fexceptions -analyzer-checker=debug.DumpCFG -analyzer-config cfg-lifetime=true %s > %t 2>&1
 // RUN: FileCheck --input-file=%t %s
 
 // FIXME Most of the cases in this file test only with the objects of type `A`,
diff --git a/clang/test/Analysis/loopexit-cfg-output.cpp b/clang/test/Analysis/loopexit-cfg-output.cpp
index 8e53ce3066b7f..26ef33e4a6a9a 100644
--- a/clang/test/Analysis/loopexit-cfg-output.cpp
+++ b/clang/test/Analysis/loopexit-cfg-output.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-loopexit=true %s > %t 2>&1
+// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config cfg-loopexit=true %s > %t 2>&1
 // RUN: FileCheck --input-file=%t %s
 
 // CHECK:       [B6 (ENTRY)]
diff --git a/clang/test/Analysis/method-arg-decay.m b/clang/test/Analysis/method-arg-decay.m
index a222346861a5d..69fd7a241b712 100644
--- a/clang/test/Analysis/method-arg-decay.m
+++ b/clang/test/Analysis/method-arg-decay.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyzer-checker=core -verify %s -Wno-incomplete-implementation
+// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s -Wno-incomplete-implementation
 typedef signed char BOOL;
 typedef int NSInteger;
 typedef unsigned int NSUInteger;
diff --git a/clang/test/Analysis/null-deref-static.m b/clang/test/Analysis/null-deref-static.m
index 06a97644aa1d1..2bfb4af29241a 100644
--- a/clang/test/Analysis/null-deref-static.m
+++ b/clang/test/Analysis/null-deref-static.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -w -fblocks -analyze -analyzer-checker=core,deadcode,alpha.core,debug.ExprInspection -verify %s
+// RUN: %clang_analyze_cc1 -w -fblocks -analyzer-checker=core,deadcode,alpha.core,debug.ExprInspection -verify %s
 
 void *malloc(unsigned long);
 void clang_analyzer_warnIfReached(void);
diff --git a/clang/test/Analysis/objc-encode.m b/clang/test/Analysis/objc-encode.m
index 1d6515c2405a2..afa71c3a9432d 100644
--- a/clang/test/Analysis/objc-encode.m
+++ b/clang/test/Analysis/objc-encode.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.ExprInspection -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -verify %s
 // expected-no-diagnostics
 
 void clang_analyzer_eval(int);
diff --git a/clang/test/Analysis/openmp-unsupported.c b/clang/test/Analysis/openmp-unsupported.c
index 85dd4b66ba871..c6769bd166db0 100644
--- a/clang/test/Analysis/openmp-unsupported.c
+++ b/clang/test/Analysis/openmp-unsupported.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -tri...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/145895


More information about the cfe-commits mailing list