Merging r292638:
------------------------------------------------------------------------
r292638 | ericwf | 2017-01-20 11:34:19 -0800 (Fri, 20 Jan 2017) | 9 lines

Fix catch_reference_nullptr.pass.cpp test for GCC.

This test contained an implicit conversion from nullptr to bool.
Clang warns about this but the test had supressed that warning.
However GCC diagnoses the same code as an error and requires
-fpermissive to accept it.

This patch fixes both the warning and the error by explicitly
converting the pointer to bool.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/branches/release_40@293813 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/catch_reference_nullptr.pass.cpp b/test/catch_reference_nullptr.pass.cpp
index 3ab520f..82a49df 100644
--- a/test/catch_reference_nullptr.pass.cpp
+++ b/test/catch_reference_nullptr.pass.cpp
@@ -12,12 +12,6 @@
 #include <cassert>
 #include <cstdlib>
 
-// Clang emits a warning on converting an object of type nullptr_t to bool,
-// even in generic code. Suppress it.
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wnull-conversion"
-#endif
-
 struct A {};
 
 template<typename T, bool CanCatchNullptr>
@@ -25,7 +19,7 @@
   try {
     throw nullptr;
   } catch (T &p) {
-    assert(CanCatchNullptr && !p);
+    assert(CanCatchNullptr && !static_cast<bool>(p));
   } catch (...) {
     assert(!CanCatchNullptr);
   }