if (NewIsTentative || OldIsTentative)
return New;
}
+ // Handle __private_extern__ just like extern.
if (Old->getStorageClass() != VarDecl::Extern &&
- New->getStorageClass() != VarDecl::Extern) {
+ Old->getStorageClass() != VarDecl::PrivateExtern &&
+ New->getStorageClass() != VarDecl::Extern &&
+ New->getStorageClass() != VarDecl::PrivateExtern) {
Diag(New->getLocation(), diag::err_redefinition, New->getName());
Diag(Old->getLocation(), diag::err_previous_definition);
}
static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}} expected-error{{previous definition is here}}
int i1 = 3; // expected-error{{non-static declaration of 'i1' follows static declaration}}
+__private_extern__ int pExtern;
+int pExtern = 0;
+
void func() {
extern int i1; // expected-error{{previous definition is here}}
static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}}