commit | b7fadb6925ab81a27cf6718e78759cdb1a9cd1cb | [log] [tgz] |
---|---|---|
author | Vaclav Brozek <[email protected]> | Thu Aug 30 06:39:53 2018 |
committer | Commit Bot <[email protected]> | Thu Aug 30 06:39:53 2018 |
tree | ad05ed4bc02c79ac8e4cbf2aecce243e215000a0 | |
parent | be0152cd4994893a2855227ce0b9730aa914a6a5 [diff] |
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}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .