PR libstdc++/82481 Suppress clang-tidy warnings
authorJonathan Wakely <jwakely@redhat.com>
Fri, 13 Oct 2017 12:39:24 +0000 (13:39 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 13 Oct 2017 12:39:24 +0000 (13:39 +0100)
PR libstdc++/82481
* include/std/mutex (call_once): Suppress clang-tidy warnings about
dangling references.

From-SVN: r253724

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/mutex

index 9a512b15b100f91f728f5b0a624799077425826f..1b8432da660cde76869f2b1c7f6d9fa6800c34f1 100644 (file)
@@ -1,3 +1,9 @@
+2017-10-13  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/82481
+       * include/std/mutex (call_once): Suppress clang-tidy warnings about
+       dangling references.
+
 2017-10-10  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/bits/streambuf_iterator.h (istreambuf_iterator::equal):
index 8c692a88ffdcdfc9544755ee9bfa5426808abe36..50420ee22d4256ffc2451c8f4254f256a99a6a5a 100644 (file)
@@ -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);
     }