doc: add example how to test deprecated functions
by temporarily disabling -Wdeprecated-declarations BUG=None No-Try: true Change-Id: I79433693f12c08ed37a5e5369e6e70a3e4e482bc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369500 Commit-Queue: Philipp Hancke <phancke@meta.com> Reviewed-by: Florent Castelli <orphis@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43480}
This commit is contained in:
parent
b0be928a50
commit
5a4a69f95c
@ -110,6 +110,13 @@ inline std::pony PonyPlz(const std::pony_spec& ps) {
|
||||
return DEPRECATED_PonyPlz(ps);
|
||||
}
|
||||
```
|
||||
or wrap the test with
|
||||
```cpp
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
TEST_...
|
||||
#pragma clang diagnostic pop
|
||||
```
|
||||
|
||||
In other words, rename the existing function, and provide an inline wrapper
|
||||
using the original name that calls it. That way, callers who are willing to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user