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 | a9f6ef84f768fec50a1be08bb374b45b6c662483 (patch) | |
tree | 35c42b7a43096c3b904751ae095f28e41aff3fe3 /clang-tools-extra/test | |
parent | b76f08513ce19f80a50471cf4b1b680e82f7f95c (diff) |
[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
Diffstat (limited to 'clang-tools-extra/test')
-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. |