Remove the restriction on module-private friends. Since the friend

declaration may be the first declaration, we want the ability to that
declaration to be marked module-private.

llvm-svn: 139497
This commit is contained in:
Douglas Gregor
2011-09-12 15:48:15 +00:00
parent b63ab9477c
commit fc33bcfc4a
3 changed files with 2 additions and 11 deletions

View File

@@ -899,13 +899,6 @@ void DeclSpec::Finish(Diagnostic &D, Preprocessor &PP) {
ClearStorageClassSpecs();
}
// A friend cannot be specified as module-private.
if (isFriendSpecified() && isModulePrivateSpecified()) {
Diag(D, ModulePrivateLoc, diag::err_module_private_friend)
<< FixItHint::CreateRemoval(ModulePrivateLoc);
ModulePrivateLoc = SourceLocation();
}
assert(!TypeSpecOwned || isDeclRep((TST) TypeSpecType));
// Okay, now we can infer the real type.