diff options
Diffstat (limited to 'test/CodeGen/inline.c')
-rw-r--r-- | test/CodeGen/inline.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/test/CodeGen/inline.c b/test/CodeGen/inline.c index 6bc583df..2a01f25 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: echo "\nC99 tests:" +// 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 "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(); |