Skip to content

Commit 4445a7d

Browse files
authored
Use the DEFINE directive in LIT tests to simplify the repeated lines
1 parent 8893dd5 commit 4445a7d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

clang/test/Analysis/pch_macro.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
// RUN: mkdir -p %t
33
// RUN: split-file %s %t
44

5-
// RUN: %clang_cc1 -x c++ -triple x86_64-apple-macosx10.15.0 -emit-pch -o %t/header.pch %t/header.h
6-
// RUN: %clang_analyze_cc1 -triple x86_64-apple-macosx10.15.0 -include-pch %t/header.pch \
7-
// RUN: -analyzer-checker=core,apiModeling,unix.StdCLibraryFunctions -verify %t/main.cpp
8-
//
9-
// RUN: %clang_cc1 -x c++ -emit-pch -o %t/header.pch %t/header.h
10-
// RUN: %clang_analyze_cc1 -include-pch %t/header.pch \
11-
// RUN: -analyzer-checker=core,apiModeling,unix.StdCLibraryFunctions -verify %t/main.cpp
5+
// DEFINE: %{emit-pch-action} = \
6+
// DEFINE: %clang_cc1 -x c++ -emit-pch -o %t/header.pch %t/header.h
7+
8+
// DEFINE: %{analyze-action} = \
9+
// DEFINE: %clang_analyze_cc1 -include-pch %t/header.pch \
10+
// DEFINE: -analyzer-checker=core,apiModeling,unix.StdCLibraryFunctions \
11+
// DEFINE: -verify %t/main.cpp
12+
13+
// RUN: %{emit-pch-action} -triple x86_64-apple-macosx10.15.0
14+
// RUN: %{analyze-action} -triple x86_64-apple-macosx10.15.0
15+
// RUN: %{emit-pch-action}
16+
// RUN: %{analyze-action}
1217

1318

1419
//--- header.h

0 commit comments

Comments
 (0)