[PATCH] D26744: [clang-tidy] Fix identifier naming for initializer list member initializers.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 13:19:59 PST 2016


EricWF marked an inline comment as done.
EricWF added inline comments.


================
Comment at: test/clang-tidy/readability-identifier-naming.cpp:155
 // CHECK-FIXES: {{^}}class CMyClass {{{$}}
+public:
     my_class();
----------------
aaron.ballman wrote:
> Why set the access specifier here (and below)?
The tests below need to call these constructors to test base class initializers.


================
Comment at: test/clang-tidy/readability-identifier-naming.cpp:224
+  // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for private member 'my_Bad_Member'
+  // CHECK-FIXES: {{^}}  t_t __my_Bad_Member;{{$}}
+  int my_Other_Bad_Member = 42;
----------------
aaron.ballman wrote:
> Wait, our fix is to turn the name into a reserved identifier? That seems less-than-ideal (not that you are changing this behavior, mostly just that this will generate a new diagnostic on the fixed code).
It's just for the test, See the RUN lines:
```
// RUN:     {key: readability-identifier-naming.PrivateMemberPrefix, value: '__'}, 
```


https://reviews.llvm.org/D26744





More information about the cfe-commits mailing list