Page MenuHomePhabricator

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

Authored by hokein on Aug 16 2017, 1:59 AM.



The current fix will break the compilation -- because braced list is not
deducible in std::make_unique (with the use of forwarding) without
specifying the type explicitly.

We could support it in the future.

Diff Detail


Event Timeline

hokein created this revision.Aug 16 2017, 1:59 AM
alexfh accepted this revision.Aug 16 2017, 8:32 AM


253 ↗(On Diff #111320)

I'd leave CHECK-FIXES with the original text to ensure no unwanted replacements are performed.

This revision is now accepted and ready to land.Aug 16 2017, 8:32 AM
hokein updated this revision to Diff 111481.Aug 17 2017, 2:12 AM

Add CHECK-FIXES, and fix an uncaught issue.

hokein marked an inline comment as done.Aug 17 2017, 2:17 AM
hokein added inline comments.
253 ↗(On Diff #111320)

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.

alexfh accepted this revision.Aug 17 2017, 2:50 AM

Still LG with one comment.

60 ↗(On Diff #111481)

I'd suggest using a less ambiguous phrase: instead of "Returns whether X." I write "Returns \c true when X".

hokein updated this revision to Diff 111485.Aug 17 2017, 2:57 AM
hokein marked 2 inline comments as done.

Address review comments.

This revision was automatically updated to reflect the committed changes.