diff options
author | Haojian Wu <hokein@google.com> | 2018-11-26 12:42:08 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2018-11-26 12:42:08 +0000 |
commit | 77c56fffadacefcced1155a7490738ab1253b728 (patch) | |
tree | 2aa1ef3684662bba0348261b7b1fd7d0e21be8e9 /clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp | |
parent | 15b8cd919033a78a55256b2e7cda81de2b29c2e0 (diff) | |
download | bcm5719-llvm-77c56fffadacefcced1155a7490738ab1253b728.tar.gz bcm5719-llvm-77c56fffadacefcced1155a7490738ab1253b728.zip |
[clang-tidy] No warning for auto new expression in smart check
Summary: The fix for `auto` new expression is illegal.
Reviewers: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D54832
llvm-svn: 347551
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp b/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp index f3071f3aac5..65246da7a23 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp @@ -341,6 +341,9 @@ void initialization(int T, Base b) { // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use std::make_unique instead // CHECK-FIXES: PE1 = std::make_unique<E>(); + // No warnings for `auto` new expression. + PE1.reset(new auto(E())); + //============================================================================ // NOTE: For initlializer-list constructors, the check only gives warnings, // and no fixes are generated. |