[cfe-commits] [libcxx] r127499 - /libcxx/trunk/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp
Nick Kledzik
kledzik at apple.com
Fri Mar 11 14:33:07 PST 2011
Author: kledzik
Date: Fri Mar 11 16:33:07 2011
New Revision: 127499
URL: http://llvm.org/viewvc/llvm-project?rev=127499&view=rev
Log:
<rdar://problem/9073695> std::uncaught_exception() becomes true before evaluating the throw-expression rather than after
Modified:
libcxx/trunk/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp
Modified: libcxx/trunk/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp?rev=127499&r1=127498&r2=127499&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp Fri Mar 11 16:33:07 2011
@@ -20,13 +20,22 @@
}
};
+struct B
+{
+ B()
+ {
+ // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#475
+ assert(!std::uncaught_exception());
+ }
+};
+
int main()
{
try
{
A a;
assert(!std::uncaught_exception());
- throw 1;
+ throw B();
}
catch (...)
{
More information about the cfe-commits
mailing list