File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -96,16 +96,17 @@ struct virtual_offset {
96
96
template <class R , class B , class ... TArgs>
97
97
inline auto offset (R (B::*f)(TArgs...) const ) {
98
98
auto ptr = reinterpret_cast <std::size_t (virtual_offset::*)(int )>(f);
99
- return (virtual_offset{}.*ptr)(0 );
99
+ return (virtual_offset{}.*ptr)(0 ); // NOLINT
100
100
}
101
101
102
102
template <class R , class B , class ... TArgs>
103
103
inline auto offset (R (B::*f)(TArgs...)) {
104
104
auto ptr = reinterpret_cast <std::size_t (virtual_offset::*)(int )>(f);
105
- return (virtual_offset{}.*ptr)(0 );
105
+ return (virtual_offset{}.*ptr)(0 ); // NOLINT
106
106
}
107
107
108
108
template <class T >
109
+ __attribute__ ((no_sanitize(" undefined" )))
109
110
inline auto dtor_offset () {
110
111
virtual_offset offset;
111
112
union_cast<T *>(&offset)->~T ();
Original file line number Diff line number Diff line change @@ -286,9 +286,9 @@ class GTest : public detail::GTest<T, TParamType> {};
286
286
&__GUNIT_CAT(GTEST_GENERATE_NAMES, __LINE__))
287
287
288
288
#define GTEST (...) \
289
- __GUNIT_CAT (__GTEST_IMPL_, __GUNIT_SIZE(__VA_ARGS__))(false , __VA_ARGS__)
289
+ __GUNIT_CAT (__GTEST_IMPL_, __GUNIT_SIZE(__VA_ARGS__))(false , __VA_ARGS__) // NOLINT
290
290
#define DISABLED_GTEST (...) \
291
- __GUNIT_CAT (__GTEST_IMPL_, __GUNIT_SIZE(__VA_ARGS__))(true , __VA_ARGS__)
291
+ __GUNIT_CAT (__GTEST_IMPL_, __GUNIT_SIZE(__VA_ARGS__))(true , __VA_ARGS__) // NOLINT
292
292
293
293
#define SHOULD (NAME ) if (tr_gtest.run(" SHOULD" , NAME, __LINE__))
294
294
#define DISABLED_SHOULD (NAME ) if (tr_gtest.run(" SHOULD" , NAME, __LINE__, true ))
You can’t perform that action at this time.
0 commit comments