diff options
Diffstat (limited to 'test/Sema/dllexport.c')
-rw-r--r-- | test/Sema/dllexport.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/dllexport.c b/test/Sema/dllexport.c index 69aad2eb54c0..56c9e74225f2 100644 --- a/test/Sema/dllexport.c +++ b/test/Sema/dllexport.c @@ -109,6 +109,11 @@ __declspec(dllexport) void redecl6(); // expected-warning{{redeclaration of 'red // External linkage is required. __declspec(dllexport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllexport'}} +// Static locals don't count as having external linkage. +void staticLocalFunc() { + __declspec(dllexport) static int staticLocal; // expected-error{{'staticLocal' must have external linkage when declared 'dllexport'}} +} + //===----------------------------------------------------------------------===// |