diff options
Diffstat (limited to 'test/CodeGenCXX/exceptions.cpp')
-rw-r--r-- | test/CodeGenCXX/exceptions.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/exceptions.cpp b/test/CodeGenCXX/exceptions.cpp new file mode 100644 index 0000000..396ff44 --- /dev/null +++ b/test/CodeGenCXX/exceptions.cpp @@ -0,0 +1,18 @@ +// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fexceptions + +struct allocator { + allocator(); + allocator(const allocator&); + ~allocator(); +}; + +void f(); +void g(bool b, bool c) { + if (b) { + if (!c) + throw allocator(); + + return; + } + f(); +} |