[PATCH] D26744: [clang-tidy] Fix identifier naming for initializer list member initializers.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 13:23:07 PST 2016
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
================
Comment at: test/clang-tidy/readability-identifier-naming.cpp:155
// CHECK-FIXES: {{^}}class CMyClass {{{$}}
+public:
my_class();
----------------
EricWF wrote:
> aaron.ballman wrote:
> > Why set the access specifier here (and below)?
> The tests below need to call these constructors to test base class initializers.
Ah, that makes sense, thank you.
================
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;
----------------
EricWF wrote:
> 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: '__'},
> ```
Oh! Phew! Now I am much less worried. :-D
https://reviews.llvm.org/D26744
More information about the cfe-commits
mailing list