aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/function.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-14 17:02:11 +0000
committerChris Lattner <sabre@nondot.org>2009-04-14 17:02:11 +0000
commitc51974328b3a378c3c40b1fa527ecb928ed2bfda (patch)
treec398775a91909783e70e4b9a33e09bbaabdb3db6 /test/Sema/function.c
parent5f4307b7ba164b03c853c8d3eb4674d33f8967a6 (diff)
implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/function.c')
-rw-r--r--test/Sema/function.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/function.c b/test/Sema/function.c
index e604d0e1ea..3a0352d753 100644
--- a/test/Sema/function.c
+++ b/test/Sema/function.c
@@ -61,3 +61,12 @@ void f1static() {
struct incomplete_test a(void) {} // expected-error{{incomplete result type 'struct incomplete_test' in function definition}} \
// expected-note{{forward declaration of 'struct incomplete_test'}}
+
+
+extern __inline
+__attribute__((__gnuc_inline__)) // expected-warning{{'gnuc_inline' attribute is overridden by 'extern inline', attribute ignored}} expected-warning{{extension used}}
+void gnu_inline1() {}
+
+void
+__attribute__((__gnuc_inline__)) // expected-warning {{'gnuc_inline' attribute requires function to be marked 'inline', attribute ignored}} expected-warning{{extension used}}
+gnu_inline2() {}