Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: test/CodeGenCXX/throw-expressions.cpp

Issue 184973004: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-clang.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/CodeGen/linux-arm-atomic.c ('k') | test/Driver/sanitizer-ld.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -Wno-unreachable-code -Werror - triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s 1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm-only -verify %s -Wno -unreachable-code
2 // expected-no-diagnostics
2 3
3 int val = 42; 4 int val = 42;
4 int& test1() { 5 int& test1() {
5 return throw val, val; 6 return throw val, val;
6 } 7 }
7 8
8 int test2() { 9 int test2() {
9 return val ? throw val : val; 10 return val ? throw val : val;
10 } 11 }
11 12
12 // rdar://problem/8608801 13 // rdar://problem/8608801
13 void test3() { 14 void test3() {
14 throw false; 15 throw false;
15 } 16 }
16 17
17 // PR10582 18 // PR10582
18 int test4() { 19 int test4() {
19 return 1 ? throw val : val; 20 return 1 ? throw val : val;
20 } 21 }
21
22 // PR15923
23 int test5(bool x, bool y, int z) {
24 return (x ? throw 1 : y) ? z : throw 2;
25 }
26 // CHECK: define i32 @_Z5test5bbi(
27 // CHECK: br i1
28 //
29 // x.true:
30 // CHECK: call void @__cxa_throw(
31 // CHECK-NEXT: unreachable
32 //
33 // x.false:
34 // CHECK: br i1
35 //
36 // y.true:
37 // CHECK: load i32*
38 // CHECK: br label
39 //
40 // y.false:
41 // CHECK: call void @__cxa_throw(
42 // CHECK-NEXT: unreachable
43 //
44 // end:
45 // CHECK: ret i32
OLDNEW
« no previous file with comments | « test/CodeGen/linux-arm-atomic.c ('k') | test/Driver/sanitizer-ld.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698