mirror of
https://github.com/google/googletest.git
synced 2025-12-07 17:26:53 +08:00
Mark ACTION_Pn()-generated functions as must-use-result.
This catches when a client creates an action and discards it, thinking that the action has actually been applied to something.
This will help people who make the mistake of defining, for example, both `void Use(Foo*)` and `ACTION(Use) { Use(arg); }` for later application to a Foo. With such an overload, a client may then write `Use();`, forgetting the param and being confused why nothing happens.
This also catches when a client defines their own action in terms of an ACTION()-generated one, invokes the ACTION's builder, and then fails to invoke the resulting action, thinking it's operating on the outer action's parameters.
PiperOrigin-RevId: 330614454
|
||
|---|---|---|
| .. | ||
| internal | ||
| gmock-actions.h | ||
| gmock-cardinalities.h | ||
| gmock-function-mocker.h | ||
| gmock-generated-actions.h | ||
| gmock-generated-actions.h.pump | ||
| gmock-matchers.h | ||
| gmock-more-matchers.h | ||
| gmock-nice-strict.h | ||
| gmock-spec-builders.h | ||
| gmock.h | ||