xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/catch-lexical-block.m (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc// RUN: %clang_cc1 -g -fobjc-exceptions -emit-llvm %s -o - | FileCheck %s
2f4a2713aSLionel Sambuc@interface Foo @end
3f4a2713aSLionel Sambucvoid f0() {
4f4a2713aSLionel Sambuc  @try {
5f4a2713aSLionel Sambuc    @throw @"a";
6f4a2713aSLionel Sambuc  } @catch(Foo *e) {
7f4a2713aSLionel Sambuc  }
8f4a2713aSLionel Sambuc}
9f4a2713aSLionel Sambuc
10f4a2713aSLionel Sambuc// We should have 3 lexical blocks here at the moment, including one
11f4a2713aSLionel Sambuc// for the catch block.
12f4a2713aSLionel Sambuc// CHECK: lexical_block
13f4a2713aSLionel Sambuc// CHECK: auto_variable
14f4a2713aSLionel Sambuc// CHECK: lexical_block
15*0a6a1f1dSLionel Sambuc// CHECK: lexical_block
16