Issue 131378
Summary [clang-tidy] Fix unit test readability/identifier-naming-anon-record-fields.cpp
Labels clang-tidy
Assignees
Reporter carlosgalvezp
    After [making clang-tidy skip processing system headers by default](https://github.com/llvm/llvm-project/pull/128150), the follow test case no longer works:

https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-anon-record-fields.cpp#L36

This is because the `CXXRecordDecl` corresponding to the global anonymous union is **not** picked up by the `ASTConsumer::handleTopLevelDecl` function, i.e. it is not considered a top-level declaration. Most likely because it's anonymous i.e. it does not have a name. Due to this, the AST traversal does not find it and so the check cannot process this case.


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to