[clang-tools-extra] [clang-tidy] Fix crash in readability-identifier-naming (PR #220221)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 4 04:20:44 PDT 2026


================
@@ -834,3 +834,11 @@ Some_struct g_s1{ .SomeMember = 1 };
 // CHECK-FIXES: Some_struct g_s1{ .some_member = 1 };
 Some_struct g_s2{.SomeMember=1};
 // CHECK-FIXES: Some_struct g_s2{.some_member=1};
+
+template<class T>
+class CX {
+  class CB;
+  class CA : public CB {
+    virtual void myFoo() { }
+  };
+};
----------------
zeyi2 wrote:

Sorry, I should have been more explicit. Please don't add the NOLINT block back or change the structs to classes. The original struct X, B, and A names were already compliant. Only T and foo need to be renamed:

```
template<class t_t>
struct X {
  struct B;
  struct A : public B {
    virtual void v_Foo() { }
  };
};
```

https://github.com/llvm/llvm-project/pull/220221


More information about the cfe-commits mailing list