aaron.ballman added inline comments.
================ Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:255 ASTContext *Ctx) { + // Skip when this is a new-expression with `auto`, e.g. "new auto(1)"." + if (New->getType()->getPointeeType()->getContainedAutoType()) ---------------- Drop the quotation marks. ================ 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())); + ---------------- 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? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54832 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits