Skip to content

Commit 52d9889

Browse files
committed
fix missing test reference updates
1 parent bd811a5 commit 52d9889

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

clang-tools-extra/test/clang-tidy/checkers/modernize/use-constexpr-locals.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
// RUN: %check_clang_tidy -std=c++14 %s modernize-use-constexpr %t -- -- -fno-delayed-template-parsing
33
// RUN: %check_clang_tidy -std=c++17 %s modernize-use-constexpr %t -- -- -fno-delayed-template-parsing
44
// RUN: %check_clang_tidy -std=c++20 %s modernize-use-constexpr %t -- -- -fno-delayed-template-parsing
5-
// RUN: %check_clang_tidy -std=c++23-or-later -check-suffix=23 %s modernize-use-constexpr %t -- -- -fno-delayed-template-parsing
65

76

87
#define FUNC(N) void func##N()
98
FUNC(0) {
109
static int f1 = 1;
1110
static const int f2 = 2;
12-
// CHECK-MESSAGES-23: :[[@LINE-1]]:22: warning: variable 'f2' can be declared 'constexpr' [modernize-use-constexpr]
13-
// CHECK-FIXES-23: static constexpr int f2 = 2;
11+
// CHECK-MESSAGES: :[[@LINE-1]]:22: warning: declare variable 'f2' as 'constexpr' [modernize-use-constexpr]
12+
// CHECK-FIXES: static constexpr int f2 = 2;
1413
const int f3 = 3;
15-
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: variable 'f3' can be declared 'constexpr' [modernize-use-constexpr]
14+
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: declare variable 'f3' as 'constexpr' [modernize-use-constexpr]
1615
// CHECK-FIXES: constexpr int f3 = 3;
17-
// CHECK-MESSAGES-23: :[[@LINE-3]]:15: warning: variable 'f3' can be declared 'constexpr' [modernize-use-constexpr]
18-
// CHECK-FIXES-23: static constexpr int f3 = 3;
1916
}
2017

clang-tools-extra/test/clang-tidy/checkers/modernize/use-constexpr-replacement-opts.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,21 @@
22
// RUN: %check_clang_tidy -std=c++14 %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR'}}"
33
// RUN: %check_clang_tidy -std=c++17 %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR'}}"
44
// RUN: %check_clang_tidy -std=c++20 %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR'}}"
5-
// RUN: %check_clang_tidy -std=c++23-or-later -check-suffix=23 %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR'}}"
6-
// RUN: %check_clang_tidy -std=c++23-or-later -check-suffix=23-STATIC %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR', modernize-use-constexpr.StaticConstexprString: 'STATIC_CXPR'}}"
5+
// RUN: %check_clang_tidy -std=c++23-or-later %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR'}}"
6+
// RUN: %check_clang_tidy -std=c++23-or-later %s modernize-use-constexpr %t -- -config="{CheckOptions: {modernize-use-constexpr.ConstexprString: 'CXPR', modernize-use-constexpr.StaticConstexprString: 'STATIC_CXPR'}}"
77

88
static int f1() { return 0; }
9-
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: function 'f1' can be declared 'constexpr' [modernize-use-constexpr]
9+
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: declare function 'f1' as 'constexpr' [modernize-use-constexpr]
1010
// CHECK-FIXES: static CXPR int f1() { return 0; }
11-
// CHECK-MESSAGES-23: :[[@LINE-3]]:12: warning: function 'f1' can be declared 'constexpr' [modernize-use-constexpr]
12-
// CHECK-FIXES-23: static CXPR int f1() { return 0; }
13-
// CHECK-MESSAGES-23-STATIC: :[[@LINE-5]]:12: warning: function 'f1' can be declared 'constexpr' [modernize-use-constexpr]
14-
// CHECK-FIXES-23-STATIC: static CXPR int f1() { return 0; }
1511

1612
#define FUNC(N) void func##N()
1713
FUNC(0) {
1814
static int f1 = 1;
1915
static const int f2 = 2;
20-
// CHECK-MESSAGES-23: :[[@LINE-1]]:22: warning: variable 'f2' can be declared 'constexpr' [modernize-use-constexpr]
21-
// CHECK-FIXES-23: static CXPR int f2 = 2;
22-
// CHECK-MESSAGES-23-STATIC: :[[@LINE-3]]:22: warning: variable 'f2' can be declared 'constexpr' [modernize-use-constexpr]
23-
// CHECK-FIXES-23-STATIC: static CXPR int f2 = 2;
16+
// CHECK-MESSAGES: :[[@LINE-1]]:22: warning: declare variable 'f2' as 'constexpr' [modernize-use-constexpr]
17+
// CHECK-FIXES: static CXPR int f2 = 2;
2418
const int f3 = 3;
25-
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: variable 'f3' can be declared 'constexpr' [modernize-use-constexpr]
19+
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: declare variable 'f3' as 'constexpr' [modernize-use-constexpr]
2620
// CHECK-FIXES: CXPR int f3 = 3;
27-
// CHECK-MESSAGES-23: :[[@LINE-3]]:15: warning: variable 'f3' can be declared 'constexpr' [modernize-use-constexpr]
28-
// CHECK-FIXES-23: static CXPR int f3 = 3;
29-
// CHECK-MESSAGES-23-STATIC: :[[@LINE-5]]:15: warning: variable 'f3' can be declared 'constexpr' [modernize-use-constexpr]
30-
// CHECK-FIXES-23-STATIC: STATIC_CXPR int f3 = 3;
3121
}
3222

0 commit comments

Comments
 (0)