1 | // RUN: %check_clang_tidy %s readability-identifier-naming %t -- \ |
2 | // RUN: --config-file=%S/Inputs/identifier-naming/hungarian-notation1/.clang-tidy -- -I %S |
3 | |
4 | #include "identifier-naming-standard-types.h" |
5 | |
6 | // clang-format off |
7 | //===----------------------------------------------------------------------===// |
8 | // Cases to CheckOptions |
9 | //===----------------------------------------------------------------------===// |
10 | class CMyClass1 { |
11 | public: |
12 | static int ClassMemberCase; |
13 | // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: invalid case style for class member 'ClassMemberCase' [readability-identifier-naming] |
14 | // CHECK-FIXES: {{^}} static int iClassMemberCase; |
15 | |
16 | char const ConstantMemberCase = 0; |
17 | // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: invalid case style for constant member 'ConstantMemberCase' [readability-identifier-naming] |
18 | // CHECK-FIXES: {{^}} char const cConstantMemberCase = 0; |
19 | |
20 | void MyFunc1(const int ConstantParameterCase); |
21 | // CHECK-MESSAGES: :[[@LINE-1]]:26: warning: invalid case style for constant parameter 'ConstantParameterCase' [readability-identifier-naming] |
22 | // CHECK-FIXES: {{^}} void MyFunc1(const int iConstantParameterCase); |
23 | |
24 | void MyFunc2(const int* ConstantPointerParameterCase); |
25 | // CHECK-MESSAGES: :[[@LINE-1]]:27: warning: invalid case style for pointer parameter 'ConstantPointerParameterCase' [readability-identifier-naming] |
26 | // CHECK-FIXES: {{^}} void MyFunc2(const int* piConstantPointerParameterCase); |
27 | |
28 | static constexpr int ConstexprVariableCase = 123; |
29 | // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: invalid case style for constexpr variable 'ConstexprVariableCase' [readability-identifier-naming] |
30 | // CHECK-FIXES: {{^}} static constexpr int iConstexprVariableCase = 123; |
31 | }; |
32 | |
33 | const int GlobalConstantCase = 0; |
34 | // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: invalid case style for global constant 'GlobalConstantCase' [readability-identifier-naming] |
35 | // CHECK-FIXES: {{^}}const int iGlobalConstantCase = 0; |
36 | |
37 | const int* GlobalConstantPointerCase = nullptr; |
38 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global pointer 'GlobalConstantPointerCase' [readability-identifier-naming] |
39 | // CHECK-FIXES: {{^}}const int* piGlobalConstantPointerCase = nullptr; |
40 | |
41 | int* GlobalPointerCase = nullptr; |
42 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global pointer 'GlobalPointerCase' [readability-identifier-naming] |
43 | // CHECK-FIXES: {{^}}int* piGlobalPointerCase = nullptr; |
44 | |
45 | int GlobalVariableCase = 0; |
46 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'GlobalVariableCase' [readability-identifier-naming] |
47 | // CHECK-FIXES: {{^}}int iGlobalVariableCase = 0; |
48 | |
49 | void Func1(){ |
50 | int const LocalConstantCase = 3; |
51 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: invalid case style for local constant 'LocalConstantCase' [readability-identifier-naming] |
52 | // CHECK-FIXES: {{^}} int const iLocalConstantCase = 3; |
53 | |
54 | unsigned const ConstantCase = 1; |
55 | // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for local constant 'ConstantCase' [readability-identifier-naming] |
56 | // CHECK-FIXES: {{^}} unsigned const uConstantCase = 1; |
57 | |
58 | int* const LocalConstantPointerCase = nullptr; |
59 | // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: invalid case style for local constant pointer 'LocalConstantPointerCase' [readability-identifier-naming] |
60 | // CHECK-FIXES: {{^}} int* const piLocalConstantPointerCase = nullptr; |
61 | |
62 | int *LocalPointerCase = nullptr; |
63 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for local pointer 'LocalPointerCase' [readability-identifier-naming] |
64 | // CHECK-FIXES: {{^}} int *piLocalPointerCase = nullptr; |
65 | |
66 | int LocalVariableCase = 0; |
67 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for local variable 'LocalVariableCase' [readability-identifier-naming] |
68 | // CHECK-FIXES: {{^}} int iLocalVariableCase = 0; |
69 | } |
70 | |
71 | class CMyClass2 { |
72 | char MemberCase; |
73 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for private member 'MemberCase' [readability-identifier-naming] |
74 | // CHECK-FIXES: {{^}} char cMemberCase; |
75 | |
76 | void Func1(int ParameterCase); |
77 | // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for parameter 'ParameterCase' [readability-identifier-naming] |
78 | // CHECK-FIXES: {{^}} void Func1(int iParameterCase); |
79 | |
80 | void Func2(const int ParameterCase); |
81 | // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: invalid case style for constant parameter 'ParameterCase' [readability-identifier-naming] |
82 | // CHECK-FIXES: {{^}} void Func2(const int iParameterCase); |
83 | |
84 | void Func3(const int *PointerParameterCase); |
85 | // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: invalid case style for pointer parameter 'PointerParameterCase' [readability-identifier-naming] |
86 | // CHECK-FIXES: {{^}} void Func3(const int *piPointerParameterCase); |
87 | }; |
88 | |
89 | class CMyClass3 { |
90 | private: |
91 | char PrivateMemberCase; |
92 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for private member 'PrivateMemberCase' [readability-identifier-naming] |
93 | // CHECK-FIXES: {{^}} char cPrivateMemberCase; |
94 | |
95 | protected: |
96 | char ProtectedMemberCase; |
97 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for protected member 'ProtectedMemberCase' [readability-identifier-naming] |
98 | // CHECK-FIXES: {{^}} char cProtectedMemberCase; |
99 | |
100 | public: |
101 | char PublicMemberCase; |
102 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for public member 'PublicMemberCase' [readability-identifier-naming] |
103 | // CHECK-FIXES: {{^}} char cPublicMemberCase; |
104 | }; |
105 | |
106 | static const int StaticConstantCase = 3; |
107 | // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for global constant 'StaticConstantCase' [readability-identifier-naming] |
108 | // CHECK-FIXES: {{^}}static const int iStaticConstantCase = 3; |
109 | |
110 | static int StaticVariableCase = 3; |
111 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global variable 'StaticVariableCase' [readability-identifier-naming] |
112 | // CHECK-FIXES: {{^}}static int iStaticVariableCase = 3; |
113 | |
114 | struct MyStruct { int StructCase; }; |
115 | // CHECK-MESSAGES: :[[@LINE-1]]:23: warning: invalid case style for public member 'StructCase' [readability-identifier-naming] |
116 | // CHECK-FIXES: {{^}}struct MyStruct { int iStructCase; }; |
117 | |
118 | struct shouldBeCamelCaseStruct { int iField; }; |
119 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for struct 'shouldBeCamelCaseStruct' [readability-identifier-naming] |
120 | // CHECK-FIXES: {{^}}struct ShouldBeCamelCaseStruct { int iField; }; |
121 | |
122 | union MyUnion { int UnionCase; long lUnionCase; }; |
123 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for union 'MyUnion' [readability-identifier-naming] |
124 | // CHECK-MESSAGES: :[[@LINE-2]]:21: warning: invalid case style for public member 'UnionCase' [readability-identifier-naming] |
125 | // CHECK-FIXES: {{^}}union myUnion { int iUnionCase; long lUnionCase; }; |
126 | |
127 | //===----------------------------------------------------------------------===// |
128 | // C string |
129 | //===----------------------------------------------------------------------===// |
130 | const char *NamePtr = "Name" ; |
131 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: invalid case style for global pointer 'NamePtr' [readability-identifier-naming] |
132 | // CHECK-FIXES: {{^}}const char *szNamePtr = "Name"; |
133 | |
134 | const char NameArray[] = "Name" ; |
135 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global constant 'NameArray' [readability-identifier-naming] |
136 | // CHECK-FIXES: {{^}}const char szNameArray[] = "Name"; |
137 | |
138 | const char *NamePtrArray[] = {"AA" , "BB" }; |
139 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: invalid case style for global variable 'NamePtrArray' [readability-identifier-naming] |
140 | // CHECK-FIXES: {{^}}const char *pszNamePtrArray[] = {"AA", "BB"}; |
141 | |
142 | const wchar_t *WideNamePtr = L"Name" ; |
143 | // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: invalid case style for global pointer 'WideNamePtr' [readability-identifier-naming] |
144 | // CHECK-FIXES: {{^}}const wchar_t *wszWideNamePtr = L"Name"; |
145 | |
146 | const wchar_t WideNameArray[] = L"Name" ; |
147 | // CHECK-MESSAGES: :[[@LINE-1]]:15: warning: invalid case style for global constant 'WideNameArray' [readability-identifier-naming] |
148 | // CHECK-FIXES: {{^}}const wchar_t wszWideNameArray[] = L"Name"; |
149 | |
150 | const wchar_t *WideNamePtrArray[] = {L"AA" , L"BB" }; |
151 | // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: invalid case style for global variable 'WideNamePtrArray' [readability-identifier-naming] |
152 | // CHECK-FIXES: {{^}}const wchar_t *pwszWideNamePtrArray[] = {L"AA", L"BB"}; |
153 | |
154 | class CMyClass4 { |
155 | private: |
156 | char *Name = "Text" ; |
157 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for private member 'Name' [readability-identifier-naming] |
158 | // CHECK-FIXES: {{^}} char *szName = "Text"; |
159 | |
160 | const char *ConstName = "Text" ; |
161 | // CHECK-MESSAGES: :[[@LINE-1]]:15: warning: invalid case style for private member 'ConstName' [readability-identifier-naming] |
162 | // CHECK-FIXES: {{^}} const char *szConstName = "Text"; |
163 | |
164 | public: |
165 | const char* DuplicateString(const char* Input, size_t nRequiredSize); |
166 | // CHECK-MESSAGES: :[[@LINE-1]]:43: warning: invalid case style for pointer parameter 'Input' [readability-identifier-naming] |
167 | // CHECK-FIXES: {{^}} const char* DuplicateString(const char* szInput, size_t nRequiredSize); |
168 | |
169 | size_t UpdateText(const char* Buffer, size_t nBufferSize); |
170 | // CHECK-MESSAGES: :[[@LINE-1]]:33: warning: invalid case style for pointer parameter 'Buffer' [readability-identifier-naming] |
171 | // CHECK-FIXES: {{^}} size_t UpdateText(const char* szBuffer, size_t nBufferSize); |
172 | }; |
173 | |
174 | |
175 | //===----------------------------------------------------------------------===// |
176 | // Microsoft Windows data types |
177 | //===----------------------------------------------------------------------===// |
178 | DWORD MsDword = 0; |
179 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsDword' [readability-identifier-naming] |
180 | // CHECK-FIXES: {{^}}DWORD dwMsDword = 0; |
181 | |
182 | BYTE MsByte = 0; |
183 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsByte' [readability-identifier-naming] |
184 | // CHECK-FIXES: {{^}}BYTE byMsByte = 0; |
185 | |
186 | WORD MsWord = 0; |
187 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsWord' [readability-identifier-naming] |
188 | // CHECK-FIXES: {{^}}WORD wMsWord = 0; |
189 | |
190 | BOOL MsBool = 0; |
191 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsBool' [readability-identifier-naming] |
192 | // CHECK-FIXES: {{^}}BOOL bMsBool = 0; |
193 | |
194 | BOOLEAN MsBoolean = 0; |
195 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'MsBoolean' [readability-identifier-naming] |
196 | // CHECK-FIXES: {{^}}BOOLEAN bMsBoolean = 0; |
197 | |
198 | CHAR MsValueChar = 0; |
199 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsValueChar' [readability-identifier-naming] |
200 | // CHECK-FIXES: {{^}}CHAR cMsValueChar = 0; |
201 | |
202 | UCHAR MsValueUchar = 0; |
203 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueUchar' [readability-identifier-naming] |
204 | // CHECK-FIXES: {{^}}UCHAR ucMsValueUchar = 0; |
205 | |
206 | SHORT MsValueShort = 0; |
207 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueShort' [readability-identifier-naming] |
208 | // CHECK-FIXES: {{^}}SHORT sMsValueShort = 0; |
209 | |
210 | USHORT MsValueUshort = 0; |
211 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'MsValueUshort' [readability-identifier-naming] |
212 | // CHECK-FIXES: {{^}}USHORT usMsValueUshort = 0; |
213 | |
214 | WORD MsValueWord = 0; |
215 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsValueWord' [readability-identifier-naming] |
216 | // CHECK-FIXES: {{^}}WORD wMsValueWord = 0; |
217 | |
218 | DWORD MsValueDword = 0; |
219 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueDword' [readability-identifier-naming] |
220 | // CHECK-FIXES: {{^}}DWORD dwMsValueDword = 0; |
221 | |
222 | DWORD32 MsValueDword32 = 0; |
223 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'MsValueDword32' [readability-identifier-naming] |
224 | // CHECK-FIXES: {{^}}DWORD32 dw32MsValueDword32 = 0; |
225 | |
226 | DWORD64 MsValueDword64 = 0; |
227 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'MsValueDword64' [readability-identifier-naming] |
228 | // CHECK-FIXES: {{^}}DWORD64 dw64MsValueDword64 = 0; |
229 | |
230 | LONG MsValueLong = 0; |
231 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsValueLong' [readability-identifier-naming] |
232 | // CHECK-FIXES: {{^}}LONG lMsValueLong = 0; |
233 | |
234 | ULONG MsValueUlong = 0; |
235 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueUlong' [readability-identifier-naming] |
236 | // CHECK-FIXES: {{^}}ULONG ulMsValueUlong = 0; |
237 | |
238 | ULONG32 MsValueUlong32 = 0; |
239 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'MsValueUlong32' [readability-identifier-naming] |
240 | // CHECK-FIXES: {{^}}ULONG32 ul32MsValueUlong32 = 0; |
241 | |
242 | ULONG64 MsValueUlong64 = 0; |
243 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'MsValueUlong64' [readability-identifier-naming] |
244 | // CHECK-FIXES: {{^}}ULONG64 ul64MsValueUlong64 = 0; |
245 | |
246 | ULONGLONG MsValueUlongLong = 0; |
247 | // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: invalid case style for global variable 'MsValueUlongLong' [readability-identifier-naming] |
248 | // CHECK-FIXES: {{^}}ULONGLONG ullMsValueUlongLong = 0; |
249 | |
250 | HANDLE MsValueHandle = 0; |
251 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global pointer 'MsValueHandle' [readability-identifier-naming] |
252 | // CHECK-FIXES: {{^}}HANDLE hMsValueHandle = 0; |
253 | |
254 | INT MsValueInt = 0; |
255 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'MsValueInt' [readability-identifier-naming] |
256 | // CHECK-FIXES: {{^}}INT iMsValueInt = 0; |
257 | |
258 | INT8 MsValueInt8 = 0; |
259 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsValueInt8' [readability-identifier-naming] |
260 | // CHECK-FIXES: {{^}}INT8 i8MsValueInt8 = 0; |
261 | |
262 | INT16 MsValueInt16 = 0; |
263 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueInt16' [readability-identifier-naming] |
264 | // CHECK-FIXES: {{^}}INT16 i16MsValueInt16 = 0; |
265 | |
266 | INT32 MsValueInt32 = 0; |
267 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueInt32' [readability-identifier-naming] |
268 | // CHECK-FIXES: {{^}}INT32 i32MsValueInt32 = 0; |
269 | |
270 | INT64 MsValueINt64 = 0; |
271 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueINt64' [readability-identifier-naming] |
272 | // CHECK-FIXES: {{^}}INT64 i64MsValueINt64 = 0; |
273 | |
274 | UINT MsValueUint = 0; |
275 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'MsValueUint' [readability-identifier-naming] |
276 | // CHECK-FIXES: {{^}}UINT uiMsValueUint = 0; |
277 | |
278 | UINT8 MsValueUint8 = 0; |
279 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'MsValueUint8' [readability-identifier-naming] |
280 | // CHECK-FIXES: {{^}}UINT8 u8MsValueUint8 = 0; |
281 | |
282 | UINT16 MsValueUint16 = 0; |
283 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'MsValueUint16' [readability-identifier-naming] |
284 | // CHECK-FIXES: {{^}}UINT16 u16MsValueUint16 = 0; |
285 | |
286 | UINT32 MsValueUint32 = 0; |
287 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'MsValueUint32' [readability-identifier-naming] |
288 | // CHECK-FIXES: {{^}}UINT32 u32MsValueUint32 = 0; |
289 | |
290 | UINT64 MsValueUint64 = 0; |
291 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'MsValueUint64' [readability-identifier-naming] |
292 | // CHECK-FIXES: {{^}}UINT64 u64MsValueUint64 = 0; |
293 | |
294 | PVOID MsValuePvoid = NULL; |
295 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global pointer 'MsValuePvoid' [readability-identifier-naming] |
296 | // CHECK-FIXES: {{^}}PVOID pMsValuePvoid = NULL; |
297 | |
298 | |
299 | //===----------------------------------------------------------------------===// |
300 | // Array |
301 | //===----------------------------------------------------------------------===// |
302 | unsigned GlobalUnsignedArray[] = {1, 2, 3}; |
303 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global variable 'GlobalUnsignedArray' [readability-identifier-naming] |
304 | // CHECK-FIXES: {{^}}unsigned aGlobalUnsignedArray[] = {1, 2, 3}; |
305 | |
306 | int GlobalIntArray[] = {1, 2, 3}; |
307 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'GlobalIntArray' [readability-identifier-naming] |
308 | // CHECK-FIXES: {{^}}int aGlobalIntArray[] = {1, 2, 3}; |
309 | |
310 | int DataInt[1] = {0}; |
311 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'DataInt' [readability-identifier-naming] |
312 | // CHECK-FIXES: {{^}}int aDataInt[1] = {0}; |
313 | |
314 | int DataArray[2] = {0}; |
315 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'DataArray' [readability-identifier-naming] |
316 | // CHECK-FIXES: {{^}}int aDataArray[2] = {0}; |
317 | |
318 | |
319 | //===----------------------------------------------------------------------===// |
320 | // Pointer |
321 | //===----------------------------------------------------------------------===// |
322 | int *DataIntPtr[1] = {0}; |
323 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'DataIntPtr' [readability-identifier-naming] |
324 | // CHECK-FIXES: {{^}}int *paDataIntPtr[1] = {0}; |
325 | |
326 | void *BufferPtr1; |
327 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global pointer 'BufferPtr1' [readability-identifier-naming] |
328 | // CHECK-FIXES: {{^}}void *pBufferPtr1; |
329 | |
330 | void **BufferPtr2; |
331 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global pointer 'BufferPtr2' [readability-identifier-naming] |
332 | // CHECK-FIXES: {{^}}void **ppBufferPtr2; |
333 | |
334 | void **pBufferPtr3; |
335 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global pointer 'pBufferPtr3' [readability-identifier-naming] |
336 | // CHECK-FIXES: {{^}}void **ppBufferPtr3; |
337 | |
338 | int *pBufferPtr4; |
339 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global pointer 'pBufferPtr4' [readability-identifier-naming] |
340 | // CHECK-FIXES: {{^}}int *piBufferPtr4; |
341 | |
342 | typedef void (*FUNC_PTR_HELLO)(); |
343 | FUNC_PTR_HELLO Hello = NULL; |
344 | // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: invalid case style for global pointer 'Hello' [readability-identifier-naming] |
345 | // CHECK-FIXES: {{^}}FUNC_PTR_HELLO fnHello = NULL; |
346 | |
347 | void *ValueVoidPtr = NULL; |
348 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global pointer 'ValueVoidPtr' [readability-identifier-naming] |
349 | // CHECK-FIXES: {{^}}void *pValueVoidPtr = NULL; |
350 | |
351 | ptrdiff_t PtrDiff = NULL; |
352 | // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: invalid case style for global variable 'PtrDiff' [readability-identifier-naming] |
353 | // CHECK-FIXES: {{^}}ptrdiff_t pPtrDiff = NULL; |
354 | |
355 | int8_t *ValueI8Ptr; |
356 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global pointer 'ValueI8Ptr' [readability-identifier-naming] |
357 | // CHECK-FIXES: {{^}}int8_t *pi8ValueI8Ptr; |
358 | |
359 | uint8_t *ValueU8Ptr; |
360 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global pointer 'ValueU8Ptr' [readability-identifier-naming] |
361 | // CHECK-FIXES: {{^}}uint8_t *pu8ValueU8Ptr; |
362 | |
363 | unsigned char *ValueUcPtr; |
364 | // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: invalid case style for global pointer 'ValueUcPtr' [readability-identifier-naming] |
365 | // CHECK-FIXES: {{^}}unsigned char *pucValueUcPtr; |
366 | |
367 | unsigned char **ValueUcPtr2; |
368 | // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: invalid case style for global pointer 'ValueUcPtr2' [readability-identifier-naming] |
369 | // CHECK-FIXES: {{^}}unsigned char **ppucValueUcPtr2; |
370 | |
371 | void MyFunc2(void* Val){} |
372 | // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: invalid case style for pointer parameter 'Val' [readability-identifier-naming] |
373 | // CHECK-FIXES: {{^}}void MyFunc2(void* pVal){} |
374 | |
375 | |
376 | //===----------------------------------------------------------------------===// |
377 | // Reference |
378 | //===----------------------------------------------------------------------===// |
379 | int iValueIndex = 1; |
380 | int &RefValueIndex = iValueIndex; |
381 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'RefValueIndex' [readability-identifier-naming] |
382 | // CHECK-FIXES: {{^}}int &iRefValueIndex = iValueIndex; |
383 | |
384 | const int &ConstRefValue = iValueIndex; |
385 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global variable 'ConstRefValue' [readability-identifier-naming] |
386 | // CHECK-FIXES: {{^}}const int &iConstRefValue = iValueIndex; |
387 | |
388 | long long llValueLongLong = 2; |
389 | long long &RefValueLongLong = llValueLongLong; |
390 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global variable 'RefValueLongLong' [readability-identifier-naming] |
391 | // CHECK-FIXES: {{^}}long long &llRefValueLongLong = llValueLongLong; |
392 | |
393 | |
394 | //===----------------------------------------------------------------------===// |
395 | // Various types |
396 | //===----------------------------------------------------------------------===// |
397 | int8_t ValueI8; |
398 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'ValueI8' [readability-identifier-naming] |
399 | // CHECK-FIXES: {{^}}int8_t i8ValueI8; |
400 | |
401 | int16_t ValueI16 = 0; |
402 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'ValueI16' [readability-identifier-naming] |
403 | // CHECK-FIXES: {{^}}int16_t i16ValueI16 = 0; |
404 | |
405 | int32_t ValueI32 = 0; |
406 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'ValueI32' [readability-identifier-naming] |
407 | // CHECK-FIXES: {{^}}int32_t i32ValueI32 = 0; |
408 | |
409 | int64_t ValueI64 = 0; |
410 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'ValueI64' [readability-identifier-naming] |
411 | // CHECK-FIXES: {{^}}int64_t i64ValueI64 = 0; |
412 | |
413 | uint8_t ValueU8 = 0; |
414 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'ValueU8' [readability-identifier-naming] |
415 | // CHECK-FIXES: {{^}}uint8_t u8ValueU8 = 0; |
416 | |
417 | uint16_t ValueU16 = 0; |
418 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global variable 'ValueU16' [readability-identifier-naming] |
419 | // CHECK-FIXES: {{^}}uint16_t u16ValueU16 = 0; |
420 | |
421 | uint32_t ValueU32 = 0; |
422 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global variable 'ValueU32' [readability-identifier-naming] |
423 | // CHECK-FIXES: {{^}}uint32_t u32ValueU32 = 0; |
424 | |
425 | uint64_t ValueU64 = 0; |
426 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global variable 'ValueU64' [readability-identifier-naming] |
427 | // CHECK-FIXES: {{^}}uint64_t u64ValueU64 = 0; |
428 | |
429 | float ValueFloat = 0; |
430 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'ValueFloat' [readability-identifier-naming] |
431 | // CHECK-FIXES: {{^}}float fValueFloat = 0; |
432 | |
433 | double ValueDouble = 0; |
434 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'ValueDouble' [readability-identifier-naming] |
435 | // CHECK-FIXES: {{^}}double dValueDouble = 0; |
436 | |
437 | char ValueChar = 'c'; |
438 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'ValueChar' [readability-identifier-naming] |
439 | // CHECK-FIXES: {{^}}char cValueChar = 'c'; |
440 | |
441 | bool ValueBool = true; |
442 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'ValueBool' [readability-identifier-naming] |
443 | // CHECK-FIXES: {{^}}bool bValueBool = true; |
444 | |
445 | int ValueInt = 0; |
446 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'ValueInt' [readability-identifier-naming] |
447 | // CHECK-FIXES: {{^}}int iValueInt = 0; |
448 | |
449 | size_t ValueSize = 0; |
450 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'ValueSize' [readability-identifier-naming] |
451 | // CHECK-FIXES: {{^}}size_t nValueSize = 0; |
452 | |
453 | wchar_t ValueWchar = 'w'; |
454 | // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for global variable 'ValueWchar' [readability-identifier-naming] |
455 | // CHECK-FIXES: {{^}}wchar_t wcValueWchar = 'w'; |
456 | |
457 | short ValueShort = 0; |
458 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'ValueShort' [readability-identifier-naming] |
459 | // CHECK-FIXES: {{^}}short sValueShort = 0; |
460 | |
461 | unsigned ValueUnsigned = 0; |
462 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global variable 'ValueUnsigned' [readability-identifier-naming] |
463 | // CHECK-FIXES: {{^}}unsigned uValueUnsigned = 0; |
464 | |
465 | signed ValueSigned = 0; |
466 | // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for global variable 'ValueSigned' [readability-identifier-naming] |
467 | // CHECK-FIXES: {{^}}signed sValueSigned = 0; |
468 | |
469 | long ValueLong = 0; |
470 | // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: invalid case style for global variable 'ValueLong' [readability-identifier-naming] |
471 | // CHECK-FIXES: {{^}}long lValueLong = 0; |
472 | |
473 | long long ValueLongLong = 0; |
474 | // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: invalid case style for global variable 'ValueLongLong' [readability-identifier-naming] |
475 | // CHECK-FIXES: {{^}}long long llValueLongLong = 0; |
476 | |
477 | long long int ValueLongLongInt = 0; |
478 | // CHECK-MESSAGES: :[[@LINE-1]]:15: warning: invalid case style for global variable 'ValueLongLongInt' [readability-identifier-naming] |
479 | // CHECK-FIXES: {{^}}long long int lliValueLongLongInt = 0; |
480 | |
481 | long double ValueLongDouble = 0; |
482 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: invalid case style for global variable 'ValueLongDouble' [readability-identifier-naming] |
483 | // CHECK-FIXES: {{^}}long double ldValueLongDouble = 0; |
484 | |
485 | signed int ValueSignedInt = 0; |
486 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global variable 'ValueSignedInt' [readability-identifier-naming] |
487 | // CHECK-FIXES: {{^}}signed int siValueSignedInt = 0; |
488 | |
489 | signed short ValueSignedShort = 0; |
490 | // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: invalid case style for global variable 'ValueSignedShort' [readability-identifier-naming] |
491 | // CHECK-FIXES: {{^}}signed short ssValueSignedShort = 0; |
492 | |
493 | signed short int ValueSignedShortInt = 0; |
494 | // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for global variable 'ValueSignedShortInt' [readability-identifier-naming] |
495 | // CHECK-FIXES: {{^}}signed short int ssiValueSignedShortInt = 0; |
496 | |
497 | signed long long ValueSignedLongLong = 0; |
498 | // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for global variable 'ValueSignedLongLong' [readability-identifier-naming] |
499 | // CHECK-FIXES: {{^}}signed long long sllValueSignedLongLong = 0; |
500 | |
501 | signed long int ValueSignedLongInt = 0; |
502 | // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: invalid case style for global variable 'ValueSignedLongInt' [readability-identifier-naming] |
503 | // CHECK-FIXES: {{^}}signed long int sliValueSignedLongInt = 0; |
504 | |
505 | signed long ValueSignedLong = 0; |
506 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: invalid case style for global variable 'ValueSignedLong' [readability-identifier-naming] |
507 | // CHECK-FIXES: {{^}}signed long slValueSignedLong = 0; |
508 | |
509 | unsigned long long int ValueUnsignedLongLongInt = 0; |
510 | // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: invalid case style for global variable 'ValueUnsignedLongLongInt' [readability-identifier-naming] |
511 | // CHECK-FIXES: {{^}}unsigned long long int ulliValueUnsignedLongLongInt = 0; |
512 | |
513 | unsigned long long ValueUnsignedLongLong = 0; |
514 | // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: invalid case style for global variable 'ValueUnsignedLongLong' [readability-identifier-naming] |
515 | // CHECK-FIXES: {{^}}unsigned long long ullValueUnsignedLongLong = 0; |
516 | |
517 | unsigned long int ValueUnsignedLongInt = 0; |
518 | // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: invalid case style for global variable 'ValueUnsignedLongInt' [readability-identifier-naming] |
519 | // CHECK-FIXES: {{^}}unsigned long int uliValueUnsignedLongInt = 0; |
520 | |
521 | unsigned long ValueUnsignedLong = 0; |
522 | // CHECK-MESSAGES: :[[@LINE-1]]:15: warning: invalid case style for global variable 'ValueUnsignedLong' [readability-identifier-naming] |
523 | // CHECK-FIXES: {{^}}unsigned long ulValueUnsignedLong = 0; |
524 | |
525 | unsigned short int ValueUnsignedShortInt = 0; |
526 | // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: invalid case style for global variable 'ValueUnsignedShortInt' [readability-identifier-naming] |
527 | // CHECK-FIXES: {{^}}unsigned short int usiValueUnsignedShortInt = 0; |
528 | |
529 | unsigned short ValueUnsignedShort = 0; |
530 | // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: invalid case style for global variable 'ValueUnsignedShort' [readability-identifier-naming] |
531 | // CHECK-FIXES: {{^}}unsigned short usValueUnsignedShort = 0; |
532 | |
533 | unsigned int ValueUnsignedInt = 0; |
534 | // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: invalid case style for global variable 'ValueUnsignedInt' [readability-identifier-naming] |
535 | // CHECK-FIXES: {{^}}unsigned int uiValueUnsignedInt = 0; |
536 | |
537 | unsigned char ValueUnsignedChar = 0; |
538 | // CHECK-MESSAGES: :[[@LINE-1]]:15: warning: invalid case style for global variable 'ValueUnsignedChar' [readability-identifier-naming] |
539 | // CHECK-FIXES: {{^}}unsigned char ucValueUnsignedChar = 0; |
540 | |
541 | long int ValueLongInt = 0; |
542 | // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: invalid case style for global variable 'ValueLongInt' [readability-identifier-naming] |
543 | // CHECK-FIXES: {{^}}long int liValueLongInt = 0; |
544 | |
545 | |
546 | //===----------------------------------------------------------------------===// |
547 | // Specifier, Qualifier, Other keywords |
548 | //===----------------------------------------------------------------------===// |
549 | volatile int VolatileInt = 0; |
550 | // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: invalid case style for global variable 'VolatileInt' [readability-identifier-naming] |
551 | // CHECK-FIXES: {{^}}volatile int iVolatileInt = 0; |
552 | |
553 | thread_local int ThreadLocalValueInt = 0; |
554 | // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for global variable 'ThreadLocalValueInt' [readability-identifier-naming] |
555 | // CHECK-FIXES: {{^}}thread_local int iThreadLocalValueInt = 0; |
556 | |
557 | extern int ExternValueInt; |
558 | // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: invalid case style for global variable 'ExternValueInt' [readability-identifier-naming] |
559 | // CHECK-FIXES: {{^}}extern int iExternValueInt; |
560 | |
561 | struct DataBuffer { |
562 | mutable size_t Size; |
563 | }; |
564 | // CHECK-MESSAGES: :[[@LINE-2]]:20: warning: invalid case style for public member 'Size' [readability-identifier-naming] |
565 | // CHECK-FIXES: {{^}} mutable size_t nSize; |
566 | |
567 | static constexpr int const &ConstExprInt = 42; |
568 | // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: invalid case style for constexpr variable 'ConstExprInt' [readability-identifier-naming] |
569 | // CHECK-FIXES: {{^}}static constexpr int const &iConstExprInt = 42; |
570 | |
571 | |
572 | //===----------------------------------------------------------------------===// |
573 | // Redefined types |
574 | //===----------------------------------------------------------------------===// |
575 | typedef int INDEX; |
576 | INDEX iIndex = 0; |
577 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for global variable 'iIndex' [readability-identifier-naming] |
578 | // CHECK-FIXES: {{^}}INDEX Index = 0; |
579 | |
580 | |
581 | //===----------------------------------------------------------------------===// |
582 | // Class |
583 | //===----------------------------------------------------------------------===// |
584 | class ClassCase { int Func(); }; |
585 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'ClassCase' [readability-identifier-naming] |
586 | // CHECK-FIXES: {{^}}class CClassCase { int Func(); }; |
587 | |
588 | class AbstractClassCase { virtual int Func() = 0; }; |
589 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for abstract class 'AbstractClassCase' [readability-identifier-naming] |
590 | // CHECK-FIXES: {{^}}class IAbstractClassCase { virtual int Func() = 0; }; |
591 | |
592 | class AbstractClassCase1 { virtual int Func1() = 0; int Func2(); }; |
593 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for abstract class 'AbstractClassCase1' [readability-identifier-naming] |
594 | // CHECK-FIXES: {{^}}class IAbstractClassCase1 { virtual int Func1() = 0; int Func2(); }; |
595 | |
596 | class ClassConstantCase { public: static const int iConstantCase; }; |
597 | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'ClassConstantCase' [readability-identifier-naming] |
598 | // CHECK-FIXES: {{^}}class CClassConstantCase { public: static const int iConstantCase; }; |
599 | |
600 | //===----------------------------------------------------------------------===// |
601 | // Other Cases |
602 | //===----------------------------------------------------------------------===// |
603 | int lower_case = 0; |
604 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'lower_case' [readability-identifier-naming] |
605 | // CHECK-FIXES: {{^}}int iLowerCase = 0; |
606 | |
607 | int lower_case1 = 0; |
608 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'lower_case1' [readability-identifier-naming] |
609 | // CHECK-FIXES: {{^}}int iLowerCase1 = 0; |
610 | |
611 | int lower_case_2 = 0; |
612 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'lower_case_2' [readability-identifier-naming] |
613 | // CHECK-FIXES: {{^}}int iLowerCase2 = 0; |
614 | |
615 | int UPPER_CASE = 0; |
616 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'UPPER_CASE' [readability-identifier-naming] |
617 | // CHECK-FIXES: {{^}}int iUpperCase = 0; |
618 | |
619 | int UPPER_CASE_1 = 0; |
620 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'UPPER_CASE_1' [readability-identifier-naming] |
621 | // CHECK-FIXES: {{^}}int iUpperCase1 = 0; |
622 | |
623 | int camelBack = 0; |
624 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'camelBack' [readability-identifier-naming] |
625 | // CHECK-FIXES: {{^}}int iCamelBack = 0; |
626 | |
627 | int camelBack_1 = 0; |
628 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'camelBack_1' [readability-identifier-naming] |
629 | // CHECK-FIXES: {{^}}int iCamelBack1 = 0; |
630 | |
631 | int camelBack2 = 0; |
632 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'camelBack2' [readability-identifier-naming] |
633 | // CHECK-FIXES: {{^}}int iCamelBack2 = 0; |
634 | |
635 | int CamelCase = 0; |
636 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'CamelCase' [readability-identifier-naming] |
637 | // CHECK-FIXES: {{^}}int iCamelCase = 0; |
638 | |
639 | int CamelCase_1 = 0; |
640 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'CamelCase_1' [readability-identifier-naming] |
641 | // CHECK-FIXES: {{^}}int iCamelCase1 = 0; |
642 | |
643 | int CamelCase2 = 0; |
644 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'CamelCase2' [readability-identifier-naming] |
645 | // CHECK-FIXES: {{^}}int iCamelCase2 = 0; |
646 | |
647 | int camel_Snake_Back = 0; |
648 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'camel_Snake_Back' [readability-identifier-naming] |
649 | // CHECK-FIXES: {{^}}int iCamelSnakeBack = 0; |
650 | |
651 | int camel_Snake_Back_1 = 0; |
652 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'camel_Snake_Back_1' [readability-identifier-naming] |
653 | // CHECK-FIXES: {{^}}int iCamelSnakeBack1 = 0; |
654 | |
655 | int Camel_Snake_Case = 0; |
656 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'Camel_Snake_Case' [readability-identifier-naming] |
657 | // CHECK-FIXES: {{^}}int iCamelSnakeCase = 0; |
658 | |
659 | int Camel_Snake_Case_1 = 0; |
660 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: invalid case style for global variable 'Camel_Snake_Case_1' [readability-identifier-naming] |
661 | // CHECK-FIXES: {{^}}int iCamelSnakeCase1 = 0; |
662 | |
663 | //===----------------------------------------------------------------------===// |
664 | // Enum |
665 | //===----------------------------------------------------------------------===// |
666 | enum REV_TYPE { RevValid }; |
667 | // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: invalid case style for enum constant 'RevValid' [readability-identifier-naming] |
668 | // CHECK-FIXES: {{^}}enum REV_TYPE { rtRevValid }; |
669 | |
670 | enum EnumConstantCase { OneByte, TwoByte }; |
671 | // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: invalid case style for enum constant 'OneByte' [readability-identifier-naming] |
672 | // CHECK-MESSAGES: :[[@LINE-2]]:34: warning: invalid case style for enum constant 'TwoByte' [readability-identifier-naming] |
673 | // CHECK-FIXES: {{^}}enum EnumConstantCase { eccOneByte, eccTwoByte }; |
674 | |
675 | enum class ScopedEnumConstantCase { Case1 }; |
676 | // CHECK-MESSAGES: :[[@LINE-1]]:37: warning: invalid case style for scoped enum constant 'Case1' [readability-identifier-naming] |
677 | // CHECK-FIXES: {{^}}enum class ScopedEnumConstantCase { seccCase1 }; |
678 | // clang-format on |
679 | |