aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM aside from a nit and a test case request. ================ Comment at: clang-tidy/bugprone/StringConstructorCheck.cpp:141 } + } else if (const Expr* Ptr = Result.Nodes.getNodeAs<Expr>("from-ptr")) { + Expr::EvalResult ConstPtr; ---------------- Formatting is wrong here, and you can use `const auto *` as the type is spelled out in the initialization. ================ Comment at: test/clang-tidy/bugprone-string-constructor.cpp:49-50 // CHECK-MESSAGES: [[@LINE-1]]:15: warning: suspicious large length parameter + std::string q6(nullptr); + // CHECK-MESSAGES: [[@LINE-1]]:15: warning: constructing string from nullptr is undefined behaviour +} ---------------- Can you also add: `std::string q7 = 0;` as a test case? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56657/new/ https://reviews.llvm.org/D56657 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits