diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
| commit | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch) | |
| tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CodeGen/inline.c | |
| parent | 9da628931ebf2609493570f87824ca22402cc65f (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/inline.c')
| -rw-r--r-- | test/CodeGen/inline.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/test/CodeGen/inline.c b/test/CodeGen/inline.c index 6bc583df8c96..2a01f255dc01 100644 --- a/test/CodeGen/inline.c +++ b/test/CodeGen/inline.c @@ -13,8 +13,14 @@ // RUN: grep "define available_externally i32 @test4" %t // RUN: grep "define available_externally i32 @test5" %t // RUN: grep "define i32 @test6" %t +// RUN: grep "define void @test7" %t +// RUN: grep "define i.. @strlcpy" %t +// RUN: not grep test9 %t +// RUN: grep "define void @testA" %t +// RUN: grep "define void @testB" %t +// RUN: grep "define void @testC" %t -// RUN: echo "\nC99 tests:" +// RUN: echo "C99 tests:" // RUN: %clang %s -O1 -emit-llvm -S -o %t -std=gnu99 // RUN: grep "define i32 @ei()" %t // RUN: grep "define available_externally i32 @foo()" %t @@ -29,9 +35,14 @@ // RUN: grep "define available_externally i32 @test4" %t // RUN: grep "define available_externally i32 @test5" %t // RUN: grep "define i32 @test6" %t +// RUN: grep "define void @test7" %t // RUN: grep "define available_externally i.. @strlcpy" %t +// RUN: grep "define void @test9" %t +// RUN: grep "define void @testA" %t +// RUN: grep "define void @testB" %t +// RUN: grep "define void @testC" %t -// RUN: echo "\nC++ tests:" +// RUN: echo "C++ tests:" // RUN: %clang -x c++ %s -O1 -emit-llvm -S -o %t -std=c++98 // RUN: grep "define linkonce_odr i32 @_Z2eiv()" %t // RUN: grep "define linkonce_odr i32 @_Z3foov()" %t @@ -102,3 +113,17 @@ void test7(); // PR11062; the fact that the function is named strlcpy matters here. inline __typeof(sizeof(int)) strlcpy(char *dest, const char *src, __typeof(sizeof(int)) size) { return 3; } void test8() { strlcpy(0,0,0); } + +// PR10657; the test crashed in C99 mode +extern inline void test9() { } +void test9(); + +inline void testA() {} +void testA(); + +void testB(); +inline void testB() {} +extern void testB(); + +extern inline void testC() {} +inline void testC(); |
