diff options
Diffstat (limited to 'clang/test/Sema/dllimport.c')
| -rw-r--r-- | clang/test/Sema/dllimport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Sema/dllimport.c b/clang/test/Sema/dllimport.c index d05ed6ef3fa..53bf372c654 100644 --- a/clang/test/Sema/dllimport.c +++ b/clang/test/Sema/dllimport.c @@ -211,9 +211,14 @@ __declspec(dllimport) void redecl6(); void redecl7(); __declspec(dllimport) inline void redecl7() {} -// PR31069: Don't crash trying to merge attributes for redeclaration of invalid decl. +// PR31069: Don't crash trying to merge attributes for redeclaration of invalid +// decl. void __declspec(dllimport) redecl8(unknowntype X); // expected-error{{unknown type name 'unknowntype'}} void redecl8(unknowntype X) { } // expected-error{{unknown type name 'unknowntype'}} +// PR32021: Similarly, don't crash trying to merge attributes from a valid +// decl to an invalid redeclaration. +void __declspec(dllimport) redecl9(void); // expected-note{{previous declaration is here}} +int redecl9(void) {} // expected-error{{conflicting types for 'redecl9'}} // External linkage is required. __declspec(dllimport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllimport'}} |

