HomePhabricator

util: Add Assume() identity function

Description

util: Add Assume() identity function

Summary:

This is needed for #20138. Please refer to the added documentation for
motivation.

Backport of core#20255.

Depends on D9681.

Comes with a linter fix for an edge case where a macro defining
((void)(val)) would be linted as (()(val)).

Ref T1611.

Test Plan:
With and without debug:

ninja all check

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1611

Differential Revision: https://reviews.bitcoinabc.org/D9680

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Oct 11 2020, 19:04
FabienCommitted on Jun 15 2021, 12:24
FabienPushed on Jun 15 2021, 12:24
Reviewer
Restricted Project
Differential Revision
D9680: util: Add Assume() identity function
Parents
rABCbf30e25f2b09: util: Make Assert work with any value
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task

Event Timeline

Fabien committed rABC12031e53db48: util: Add Assume() identity function (authored by practicalswift <practicalswift@users.noreply.github.com>).Jun 15 2021, 12:24
Fabien added a task: Restricted Maniphest Task.