Revert "Roll NDK to r11c and extract it into its own repository."
[android_tools.git] / ndk / sources / cxx-stl / gabi++ / tests / catch_pointer_nullptr.cpp
blob91f315721bd641839ebd7acc1f3d28af3b03405c
1 //===--------------------- catch_pointer_nullptr.cpp ----------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 #include <cassert>
12 #if __cplusplus >= 201103L
14 void test1()
16 try
18 throw nullptr;
19 assert(false);
21 catch (int*)
24 catch (long*)
26 assert(false);
30 struct A {};
32 void test2()
34 try
36 throw nullptr;
37 assert(false);
39 catch (A*)
42 catch (int*)
44 assert(false);
48 #else
50 void test1()
54 void test2()
58 #endif
60 int main()
62 test1();
63 test2();