forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <vabr@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Cr-Commit-Position: refs/heads/master@{#587463}
- Loading branch information
Vaclav Brozek
authored and
Commit Bot
committed
Aug 30, 2018
1 parent
be0152c
commit b7fadb6
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters