JonasToth added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:27 void UndefinedMemoryManipulationCheck::registerMatchers(MatchFinder *Finder) { - const auto NotTriviallyCopyableObject = - hasType(ast_matchers::hasCanonicalType( - pointsTo(cxxRecordDecl(isNotTriviallyCopyable())))); + const auto ArrayOfNotTriviallyCopyable = arrayType( + hasElementType(hasDeclaration(cxxRecordDecl(isNotTriviallyCopyable())))); ---------------- you can factor the `hasDeclaration(cxxRecordDecl(isNotTriviallyCopyable()))` out to avoid the copy&paste. ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-undefined-memory-manipulation.cpp:129 + types::Copy ca[10]; + memset(ca, 0, sizeof(ca)); ---------------- could you please add a test with a typedef to array to ensure that those are matched as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127036/new/ https://reviews.llvm.org/D127036 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits