Bug 1459617: Merge upstream webrtc fix for build bustage with clang trunk. r=dminor

https://webrtc.googlesource.com/src/+/bda78c9464f4d0e6ff26b0035624a967269c3b0a
This commit is contained in:
David Major 2018-05-09 16:32:31 -04:00
parent 976282cb1f
commit 4ac65c8eef
2 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ namespace optional_internal {
#if RTC_HAS_ASAN
void* FunctionThatDoesNothingImpl(void* x) { return x; }
const void* FunctionThatDoesNothingImpl(const void* x) { return x; }
#endif

View File

@ -26,18 +26,18 @@ namespace optional_internal {
#if RTC_HAS_ASAN
// This is a non-inlined function. The optimizer can't see inside it.
void* FunctionThatDoesNothingImpl(void*);
const void* FunctionThatDoesNothingImpl(const void*);
template <typename T>
inline T* FunctionThatDoesNothing(T* x) {
return reinterpret_cast<T*>(
FunctionThatDoesNothingImpl(reinterpret_cast<void*>(x)));
inline const T* FunctionThatDoesNothing(T* x) {
return reinterpret_cast<const T*>(
FunctionThatDoesNothingImpl(reinterpret_cast<const void*>(x)));
}
#else
template <typename T>
inline T* FunctionThatDoesNothing(T* x) { return x; }
inline const T* FunctionThatDoesNothing(T* x) { return x; }
#endif