You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CHECK-MESSAGES: :[[@LINE-1]]:23: warning: function 'f' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
5
-
// CHECK-FIXES: template <typename T> T f()
5
+
// CHECK-MESSAGES-STRICT: :[[@LINE-1]]:23: warning: function 'f' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
6
+
// CHECK-FIXES-STRICT: template <typename T> T f()
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:1: warning: function 'g' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
16
16
{
17
17
returnstatic_cast<int>(a - 5.F);
18
18
}
@@ -30,6 +30,7 @@ class C
30
30
31
31
inlineC(const C&) = default;
32
32
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function 'C' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
33
+
// CHECK-FIXES: C(const C&) = default;
33
34
34
35
constexprinline C& operator=(int a);
35
36
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: function 'operator=' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
@@ -52,7 +53,6 @@ class C
52
53
// CHECK-FIXES: static constexpr int C_STATIC = 42;
53
54
54
55
staticconstexprint C_STATIC_2 = 42;
55
-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: variable 'C_STATIC_2' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:18: warning: variable 'NAMESPACE_STATIC' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
65
64
66
65
inlinestaticintfn0(int i)
67
-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:1: warning: function 'fn0' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
66
+
// CHECK-MESSAGES-STRICT: :[[@LINE-1]]:1: warning: function 'fn0' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
67
+
// CHECK-FIXES-STRICT: static int fn0(int i)
68
68
{
69
69
return i - 1;
70
70
}
@@ -79,7 +79,8 @@ static constexpr inline int fn1(int i)
79
79
namespace
80
80
{
81
81
inlineintfn2(int i)
82
-
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function 'fn2' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
82
+
// CHECK-MESSAGES-STRICT: :[[@LINE-1]]:5: warning: function 'fn2' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
83
+
// CHECK-FIXES-STRICT: int fn2(int i)
83
84
{
84
85
return i - 1;
85
86
}
@@ -92,13 +93,13 @@ namespace
92
93
}
93
94
94
95
inlineconstexprint MY_CONSTEXPR_VAR = 42;
95
-
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: variable 'MY_CONSTEXPR_VAR' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
96
+
// CHECK-MESSAGES-STRICT: :[[@LINE-1]]:5: warning: variable 'MY_CONSTEXPR_VAR' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
97
+
// CHECK-FIXES-STRICT: constexpr int MY_CONSTEXPR_VAR = 42;
96
98
}
97
99
98
100
namespacens
99
101
{
100
102
inlineintfn4(int i)
101
-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: function 'fn4' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
102
103
{
103
104
return i - 1;
104
105
}
@@ -112,24 +113,19 @@ namespace ns
112
113
}
113
114
114
115
auto fn6 = [](){};
115
-
//CHECK-MESSAGES-NOT: :[[@LINE-1]]:1: warning: function 'operator()' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
116
116
117
117
template <typename T> inline T fn7();
118
-
// CHECK-MESSAGES: :[[@LINE-1]]:23: warning: function 'fn7' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
119
-
// CHECK-FIXES: template <typename T> T fn7();
120
118
121
-
template <typename T> T fn7()
122
-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:1: warning: function 'fn7' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
119
+
template <typename T> T fn7()
123
120
{
124
121
return T{};
125
122
}
126
123
127
124
template <typename T> T fn8();
128
-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:1: warning: function 'fn8' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
129
125
130
126
template <typename T> inline T fn8()
131
-
// CHECK-MESSAGES: :[[@LINE-1]]:23: warning: function 'fn8' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
132
-
// CHECK-FIXES: template <typename T> T fn8()
127
+
// CHECK-MESSAGES-STRICT: :[[@LINE-1]]:23: warning: function 'fn8' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
128
+
// CHECK-FIXES-STRICT: template <typename T> T fn8()
0 commit comments