summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/throw-expressions.cpp
blob: 1d22ec05c37fa63c8b24e22fbfee1080454ed2c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -fexceptions -emit-llvm-only -verify %s -Wno-unreachable-code

int val = 42;
int& test1() {
  return throw val, val;
}

int test2() {
  return val ? throw val : val;
}

// rdar://problem/8608801
void test3() {
  throw false;
}
OpenPOWER on IntegriCloud