aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/dllimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/dllimport.c')
-rw-r--r--test/Sema/dllimport.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/dllimport.c b/test/Sema/dllimport.c
index d81aecd604c7..f863499cf840 100644
--- a/test/Sema/dllimport.c
+++ b/test/Sema/dllimport.c
@@ -168,3 +168,8 @@ __declspec(dllimport) inline void redecl7() {}
// External linkage is required.
__declspec(dllimport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllimport'}}
+
+// Static locals don't count as having external linkage.
+void staticLocalFunc() {
+ __declspec(dllimport) static int staticLocal; // expected-error{{'staticLocal' must have external linkage when declared 'dllimport'}}
+}