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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user