avogelsgesang added inline comments.
================ Comment at: clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp:49 + Class = N->ASTNode.get<CXXRecordDecl>(); + if (!Class || !Class->isThisDeclarationADefinition() || Class->isUnion()) + return false; ---------------- njames93 wrote: > avogelsgesang wrote: > > do we also need to exclude anonymous class declarations here? (Not sure if > > those are also modelled as `CXXRecordDecl` in the clang AST...) > Good point, should also ensure there is a test case for this as well. On 2nd thought: To trigger this tweak, I click on the class name, and since anonymous structs don't have class names, I think the tweak can't even be triggered. Still probably worth a check here, just to be sure. Or at least an `assert`+ comment in the code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116514/new/ https://reviews.llvm.org/D116514 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits