This revision was automatically updated to reflect the committed changes.
Closed by commit rL360231: [clang-tidy] Do not show incorrect fix in
modernize-make-unique (authored by ibiryukov, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61642/new/
https://reviews.llvm.org/D61642
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:302
if (const auto *ImplicitCE =
dyn_cast(Arg->IgnoreImplicit())) {
if (ImplicitCE->isStdInitListInitialization())
ilya-biryukov updated this revision to Diff 198497.
ilya-biryukov marked 3 inline comments as done.
ilya-biryukov added a comment.
- Remove redundant check.
- Actually check the code stays the same in tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
aaron.ballman marked an inline comment as done.
aaron.ballman added inline comments.
Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:302
if (const auto *ImplicitCE =
dyn_cast(Arg->IgnoreImplicit())) {
if
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
BTW, for a common use-case we can do the same trick that's being done for
aggregate init:
new X({1,2,3}, 123, {a});
into
make_unique(X({1,2,3}, 123, {a}));
I can try fixing this, but would want to land this
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: aaron.ballman.
Herald added a subscriber: xazax.hun.
Herald added a project: clang.
The case when initialize_list hides behind an implicit case was not
handled before.
Repository:
rG LLVM Github Monorepo