From: Nico Rieck Date: Sun, 23 Mar 2014 22:07:53 +0000 (+0000) Subject: Fix tests in r204576 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aca5da0842de33b7178319f7279f83b63685d3cd;p=clang Fix tests in r204576 Proper redeclaration warnings for dllimport are not implemented yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204577 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/dllimport.c b/test/Sema/dllimport.c index c1b615d7b7..0bd4afc8b8 100644 --- a/test/Sema/dllimport.c +++ b/test/Sema/dllimport.c @@ -37,11 +37,11 @@ int ExternGlobalDeclInit = 1; // expected-error{{definition of dllimport data}} __declspec(dllimport) int GlobalDeclInit; int GlobalDeclInit = 1; // expected-error{{definition of dllimport data}} -int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}} -int *GlobalDeclChunkAttrInit = 0; // expected-warning{{'GlobalDeclChunkAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} +int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; +int *GlobalDeclChunkAttrInit = 0; // expected-error{{definition of dllimport data}} -int GlobalDeclAttrInit __attribute__((dllimport)); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}} -int GlobalDeclAttrInit = 1; // expected-warning{{'GlobalDeclAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} +int GlobalDeclAttrInit __attribute__((dllimport)); +int GlobalDeclAttrInit = 1; // expected-error{{definition of dllimport data}} // Redeclarations __declspec(dllimport) extern int GlobalRedecl1; diff --git a/test/SemaCXX/dllimport.cpp b/test/SemaCXX/dllimport.cpp index 82a2aa0cd8..c36718b542 100644 --- a/test/SemaCXX/dllimport.cpp +++ b/test/SemaCXX/dllimport.cpp @@ -49,11 +49,11 @@ int ExternGlobalDeclInit = 1; // expected-error{{definition of dllimport data}} __declspec(dllimport) int GlobalDeclInit; int GlobalDeclInit = 1; // expected-error{{definition of dllimport data}} -int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}} -int *GlobalDeclChunkAttrInit = 0; // expected-warning{{'GlobalDeclChunkAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} +int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; +int *GlobalDeclChunkAttrInit = 0; // expected-error{{definition of dllimport data}} -int GlobalDeclAttrInit __attribute__((dllimport)); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}} -int GlobalDeclAttrInit = 1; // expected-warning{{'GlobalDeclAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}} +int GlobalDeclAttrInit __attribute__((dllimport)); +int GlobalDeclAttrInit = 1; // expected-error{{definition of dllimport data}} // Redeclarations __declspec(dllimport) extern int GlobalRedecl1;