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
[clang-tidy] Removed redundant-inline-specifier warning on static data members (#81423)
Updated the check to ignore point static data members with in class
initializer since removing the inline specifier would generate a
compilation error
Fixes#80684
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clang-tidy/checkers/readability/redundant-inline-specifier.cpp
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -135,3 +135,17 @@ INLINE_MACRO()
135
135
136
136
#defineINLINE_KWinline
137
137
INLINE_KW voidfn10() { }
138
+
139
+
namespace {
140
+
classA
141
+
{
142
+
public:
143
+
staticinlinefloat test = 3.0F;
144
+
staticinlinedouble test2 = 3.0;
145
+
staticinlineint test3 = 3;
146
+
147
+
staticinlinefloat test4;
148
+
// CHECK-MESSAGES-STRICT: :[[@LINE-1]]:10: warning: variable 'test4' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
0 commit comments