From d1e85aa999ab87009fa02a5261754fbaa69206f2 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 13 Oct 2017 13:39:24 +0100 Subject: [PATCH] PR libstdc++/82481 Suppress clang-tidy warnings PR libstdc++/82481 * include/std/mutex (call_once): Suppress clang-tidy warnings about dangling references. From-SVN: r253724 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/std/mutex | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9a512b15b10..1b8432da660 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2017-10-13 Jonathan Wakely + + PR libstdc++/82481 + * include/std/mutex (call_once): Suppress clang-tidy warnings about + dangling references. + 2017-10-10 Jonathan Wakely * include/bits/streambuf_iterator.h (istreambuf_iterator::equal): diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index 8c692a88ffd..50420ee22d4 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -688,6 +688,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __set_once_functor_lock_ptr(0); #endif +#ifdef __clang_analyzer__ + // PR libstdc++/82481 + __once_callable = nullptr; + __once_call = nullptr; +#endif + if (__e) __throw_system_error(__e); } -- 2.30.2