if (NewFD->isInvalidDecl())
Record->setInvalidDecl();
+ if (D.getDeclSpec().isModulePrivateSpecified())
+ NewFD->setModulePrivate();
+
if (NewFD->isInvalidDecl() && PrevDecl) {
// Don't introduce NewFD into scope; there's already something
// with the same name in the same scope.
if (getLangOptions().ObjCAutoRefCount && inferObjCARCLifetime(NewID))
NewID->setInvalidDecl();
+ if (D.getDeclSpec().isModulePrivateSpecified())
+ NewID->setModulePrivate();
+
if (II) {
// FIXME: When interfaces are DeclContexts, we'll need to add
// these to the interface.
inline void test_f0_in_right() {
double &dr = f0(hidden_var);
}
+
+struct VisibleStruct {
+ __module_private__ int field;
+ __module_private__ void setField(int f);
+};
+
#else
__import_module__ left;
__import_module__ right;
// expected-error{{expected '(' for function-style cast or type construction}} \
// expected-error{{use of undeclared identifier 'vec'}}
+ VisibleStruct vs;
+ vs.field = 0; // expected-error{{no member named 'field' in 'VisibleStruct'}}
+ vs.setField(1); // expected-error{{no member named 'setField' in 'VisibleStruct'}}
+
return hidden_var; // expected-error{{use of undeclared identifier 'hidden_var'}}
}