summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-05-15 22:07:49 +0000
committerHans Wennborg <hans@hanshq.net>2014-05-15 22:07:49 +0000
commitb0f2f146bb6574ec8eba5ead788d95f47a7cc3ba (patch)
tree4c1326f49266952e3130fcc5f3c723f7343d588b /clang/test/Sema
parent03efd41bc04c44afc5e3fb5789288f3a327b0cbc (diff)
downloadbcm5719-llvm-b0f2f146bb6574ec8eba5ead788d95f47a7cc3ba.tar.gz
bcm5719-llvm-b0f2f146bb6574ec8eba5ead788d95f47a7cc3ba.zip
Allow dllimport/dllexport on inline functions and adjust the linkage.
This is a step towards handling these attributes on classes (PR11170). Differential Revision: http://reviews.llvm.org/D3772 llvm-svn: 208925
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/dllexport.c4
-rw-r--r--clang/test/Sema/dllimport.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/Sema/dllexport.c b/clang/test/Sema/dllexport.c
index 8a71e5d7251..3a80b0be158 100644
--- a/clang/test/Sema/dllexport.c
+++ b/clang/test/Sema/dllexport.c
@@ -69,10 +69,10 @@ void __declspec(dllexport) decl2B();
__declspec(dllexport) void def() {}
// Export inline function.
-__declspec(dllexport) inline void inlineFunc1() {} // expected-warning{{'dllexport' attribute ignored}}
+__declspec(dllexport) inline void inlineFunc1() {}
extern void inlineFunc1();
-inline void __attribute__((dllexport)) inlineFunc2() {} // expected-warning{{'dllexport' attribute ignored}}
+inline void __attribute__((dllexport)) inlineFunc2() {}
extern void inlineFunc2();
// Redeclarations
diff --git a/clang/test/Sema/dllimport.c b/clang/test/Sema/dllimport.c
index a4982940c65..fa3e2b385a4 100644
--- a/clang/test/Sema/dllimport.c
+++ b/clang/test/Sema/dllimport.c
@@ -97,11 +97,11 @@ void __attribute__((dllimport)) decl2A();
void __declspec(dllimport) decl2B();
// Not allowed on function definitions.
-__declspec(dllimport) void def() {} // expected-error{{'dllimport' attribute can be applied only to symbol declaration}}
+__declspec(dllimport) void def() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
// Import inline function.
-__declspec(dllimport) inline void inlineFunc1() {} // expected-warning{{'dllimport' attribute ignored}}
-inline void __attribute__((dllimport)) inlineFunc2() {} // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllimport) inline void inlineFunc1() {}
+inline void __attribute__((dllimport)) inlineFunc2() {}
// Redeclarations
__declspec(dllimport) void redecl1();
OpenPOWER on IntegriCloud