Allow std::unique_ptr<T, D>(...) in presubmit

The _CheckUniquePtr presubmit check has the following false-positive:
it flags
  auto p = std::unique_ptr<T, D>(new T(), D());
as needing a rewrite using std::make_unique.

However, there seems to be no way to pass the second template argument
to std::make_unique, so cases like this need to be exempt from the
presubmit check.

Note that the check still needs to capture cases with

count the nesting of the angle brackets. Hence, this check cannot be
captured by a regular expression and needs just a counting loop.

std: :unique_ptr<T<U, V>>, so when looking for the comma, one has to
Bug: 867823
Change-Id: Ie21067fa83aae17dd6701b0f69b902605c797e67
Reviewed-on: https://chromium-review.googlesource.com/1193945
Commit-Queue: Vaclav Brozek <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#587463}
2 files changed