MaskRay added a comment. I just took a glance and the code looks reasonable.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:131 + bool HasClear = !Candidates.empty(); + + if (HasClear) { ---------------- delete blank line ================ Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:160 + const Expr *Arg = NonMemberCall->getArg(0); + + CXXRecordDecl *ArgRecordDecl = Arg->getType()->getAsCXXRecordDecl(); ---------------- delete blank line ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/standalone-empty.cpp:161 + std::vector<int> v; + + v.empty(); ---------------- unneeded blank line ditto below They just make tests less compact without good values. ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/standalone-empty.cpp:177 + v.empty(); + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty] + // CHECK-FIXES: {{^ }} v.clear();{{$}} ---------------- `[[@LINE-1]]` is deprecated lit syntax. Use `[[#@LINE-1]]`. Don't use the prevailing style in clang-tidy tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits