hokein added inline comments.
================ Comment at: test/clang-tidy/modernize-make-unique.cpp:288 + // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use std::make_unique instead + // CHECK-FIXES: PE1.reset(new auto(E())); + ---------------- aaron.ballman wrote: > It seems like we could also generate the correct replacement for the user > here. > ``` > PE1 = std::make_unique<decltype(E())>(); > ``` > However, I feel like this isn't worth it in general and the correct behavior > is to not diagnose in this situation in the first place -- I don't think > anyone will find the `make_unique<>` version to be an improvement over the > `new auto()` version. What do you think? This seems reasonable to me. Also the `new auto()` is very rare even in our monolithic repository. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54832/new/ https://reviews.llvm.org/D54832 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits