summaryrefslogtreecommitdiff
path: root/test/CodeGen/inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/inline.c')
-rw-r--r--test/CodeGen/inline.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/CodeGen/inline.c b/test/CodeGen/inline.c
index 96f9c5c9d4bbb..6bc583df8c966 100644
--- a/test/CodeGen/inline.c
+++ b/test/CodeGen/inline.c
@@ -12,9 +12,10 @@
// RUN: grep "define void @test3()" %t
// 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: %clang %s -O1 -emit-llvm -S -o %t -std=c99
+// 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
// RUN: grep "define i32 @bar()" %t
@@ -27,6 +28,8 @@
// RUN: grep "define void @test3" %t
// 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 available_externally i.. @strlcpy" %t
// RUN: echo "\nC++ tests:"
// RUN: %clang -x c++ %s -O1 -emit-llvm -S -o %t -std=c++98
@@ -84,3 +87,18 @@ extern __inline int __attribute__ ((__gnu_inline__)) test5(void)
}
void test_test5() { test5(); }
+
+// PR10233
+
+__inline int test6() { return 0; }
+extern int test6();
+
+
+// No PR#, but this once crashed clang in C99 mode due to buggy extern inline
+// redeclaration detection.
+void test7() { }
+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); }