"inline declaration of %0 not allowed in block scope">;
def err_static_non_static : Error<
"static declaration of %0 follows non-static declaration">;
+def warn_static_non_static : ExtWarn<
+ "static declaration of %0 follows non-static declaration">;
def err_non_static_static : Error<
"non-static declaration of %0 follows static declaration">;
def err_extern_non_extern : Error<
New->getStorageClass() == SC_Static &&
Old->getStorageClass() != SC_Static &&
!canRedefineFunction(Old, getLangOptions())) {
- Diag(New->getLocation(), diag::err_static_non_static)
- << New;
+ unsigned DiagID = diag::err_static_non_static;
+ if (getLangOptions().Microsoft)
+ DiagID = diag::warn_static_non_static;
+ Diag(New->getLocation(), DiagID) << New;
Diag(Old->getLocation(), PrevDiag);
return true;
}
Base3::TYPE a6; // expected-error {{missing 'typename' prior to dependent type name}}
};
+}
+
+
+
+
+extern void static_func();
+void static_func(); // expected-note {{previous declaration is here}}
+
+
+static void static_func() // expected-warning {{static declaration of 'static_func' follows non-static declaration}}
+{
+
}
\ No newline at end of file