Commit Graph

3 Commits

Author SHA1 Message Date
Eric Fiselier 35c8983c33 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.

llvm-svn: 292638
2017-01-20 19:34:19 +00:00
Richard Smith 398d9c0c4a Attempt to bring peace to -Werror buildbots.
llvm-svn: 276022
2016-07-19 20:35:09 +00:00
Richard Smith 2f984cab4f [libcxxabi] When catching an exception of type nullptr_t with a handler of
pointer-to-member type, produce a null value of the right type.

This fixes a bug where throwing an exception of type nullptr_t and catching it
as a pointer-to-member would not guarantee to produce a null value in the catch
handler. The fix is pretty simple: we statically allocate a constant null
pointer-to-data-member representation and a constant null
pointer-to-member-function representation, and produce the address of the
relevant value as the adjusted pointer for the exception.

llvm-svn: 276016
2016-07-19 20:19:37 +00:00