[PATCH] D36786: [clang-tidy] Don't generate fixes for initializer_list constructor in make_unique check.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 02:19:43 PDT 2017


hokein marked an inline comment as done.
hokein added inline comments.


================
Comment at: test/clang-tidy/modernize-make-unique.cpp:253
   // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: use std::make_unique instead
-  // CHECK-FIXES: std::unique_ptr<E> PE2 = std::make_unique<E>({1, 2});
 
----------------
alexfh wrote:
> I'd leave CHECK-FIXES with the original text to ensure no unwanted replacements are performed.
Indeed, this is a good suggestion, and it discovered an issue of this patch (there are unexpected replacements generated for these cases).

I have updated the patch which changes a bit more code, please take a look again. 


https://reviews.llvm.org/D36786





More information about the cfe-commits mailing list