[clang-tidy] Omit std::make_unique/make_shared for default initialization.
This extends the check for default initialization in arrays added in 547f89d6 to include scalar types and exclude them from the suggested fix for make_unique/make_shared. Rewriting std::unique_ptr<int>(new int) as std::make_unique<int>() (or for other, similar trivial T) switches from default initialization to value initialization, a performance regression for trivial T. For these use cases, std::make_unique_for_overwrite is more suitable alternative. Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D90392
Loading
Please sign in to comment