[clang-tools-extra] Support renaming designated initializers (PR #86976)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 30 20:36:04 PDT 2024
================
@@ -755,3 +755,11 @@ STATIC_MACRO void someFunc(MyFunPtr, const MyFunPtr****) {}
// CHECK-FIXES: {{^}}STATIC_MACRO void someFunc(my_fun_ptr_t, const my_fun_ptr_t****) {}
#undef STATIC_MACRO
}
+
+struct Some_struct {
+ int SomeMember;
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for public member 'SomeMember' [readability-identifier-naming]
+// CHECK-FIXES: {{^}} int some_member;
+};
+Some_struct g_s{ .SomeMember = 1 };
+// CHECK-FIXES: {{^}}Some_struct g_s{ .some_member = 1 };
----------------
PiotrZSL wrote:
Add test (without whitespaces):
`Some_struct g_s{.SomeMember=1};`
https://github.com/llvm/llvm-project/pull/86976
More information about the cfe-commits
mailing list