Eli Friedman | 84fd6df | 2012-11-15 23:40:48 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s |
| 2 | |
| 3 | // PR14355: don't crash |
| 4 | // Keep this test in its own file because CodeGenTypes has global state. |
Bill Wendling | c3af679 | 2013-02-26 23:08:48 +0000 | [diff] [blame] | 5 | // CHECK: define void @test10_foo({}* %p1.coerce) [[NUW:#[0-9]+]] { |
Eli Friedman | 84fd6df | 2012-11-15 23:40:48 +0000 | [diff] [blame] | 6 | struct test10_B; |
| 7 | typedef struct test10_B test10_F3(double); |
| 8 | void test10_foo(test10_F3 p1); |
| 9 | struct test10_B test10_b(double); |
| 10 | void test10_bar() { |
| 11 | test10_foo(test10_b); |
| 12 | } |
| 13 | struct test10_B {}; |
| 14 | void test10_foo(test10_F3 p1) |
| 15 | { |
| 16 | p1(0.0); |
| 17 | } |
Bill Wendling | f7a9da0 | 2013-02-20 07:22:19 +0000 | [diff] [blame] | 18 | |
Bill Wendling | c3af679 | 2013-02-26 23:08:48 +0000 | [diff] [blame] | 19 | // CHECK: attributes [[NUW]] = { nounwind{{.*}} } |