The case when initialize_list hides behind an implicit case was not
handled before.
Details
Details
- Reviewers
aaron.ballman - Commits
- rZORG40b3d3e10dc8: [clang-tidy] Do not show incorrect fix in modernize-make-unique
rZORG4b384364a291: [clang-tidy] Do not show incorrect fix in modernize-make-unique
rG40b3d3e10dc8: [clang-tidy] Do not show incorrect fix in modernize-make-unique
rG4b384364a291: [clang-tidy] Do not show incorrect fix in modernize-make-unique
rCTE360231: [clang-tidy] Do not show incorrect fix in modernize-make-unique
rG4c32d4fd9f07: [clang-tidy] Do not show incorrect fix in modernize-make-unique
rL360231: [clang-tidy] Do not show incorrect fix in modernize-make-unique
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
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>(X({1,2,3}, 123, {a}));
I can try fixing this, but would want to land this first to fix the issue at hand.
clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp | ||
---|---|---|
278 ↗ | (On Diff #198474) | I'm wondering how to properly check that no fixes were produced here. |
clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
302 ↗ | (On Diff #198474) | We can now remove the IgnoreImplicit() call here, can't we? |
clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp | ||
278 ↗ | (On Diff #198474) | I believe we typically use CHECK-FIXES: <the original code blurb> to ensure that the fix does not change any code. |