brintos

brintos / llvm-project-archived public Read only

0
0
Text · 608 B · 61d9d3d Raw
34 lines · cpp
1// RUN: %clang_cc1 %std_cxx98- -fcxx-exceptions -fexceptions -Wno-dynamic-exception-spec %s -triple=i686-unknown-linux -emit-llvm -o - | FileCheck %s2typedef int Array[10];3 4void foo() throw (Array) {5  throw 0;6  // CHECK: landingpad7  // CHECK-NEXT: filter {{.*}} @_ZTIPi8}9 10struct S {11  void foo() throw (S[10]) {12    throw 0;13  }14};15 16template <typename T>17struct S2 {18  void foo() throw (T) {19    throw 0;20  }21};22 23int main() {24  S s;25  s.foo();26  // CHECK: landingpad27  // CHECK-NEXT: filter {{.*}} @_ZTIP1S28 29  S2 <int[10]> s2;30  s2.foo();31  // CHECK: landingpad32  // CHECK-NEXT: filter {{.*}} @_ZTIPi33}34