<< VTI << HintMessage;
}
- return AR_NotYetIntroduced;
+ return A->getStrict() ? AR_Unavailable : AR_NotYetIntroduced;
}
// Make sure that this declaration hasn't been obsoleted.
break;
case AR_NotYetIntroduced: {
- // With strict, the compiler will emit unavailable error.
- AvailabilityAttr *AA = D->getAttr<AvailabilityAttr>();
- if (AA && AA->getStrict() &&
- S.getCurContextAvailability() != AR_NotYetIntroduced)
- S.EmitAvailabilityWarning(Sema::AD_Unavailable,
- D, Message, Loc, UnknownObjCClass, ObjCPDecl,
- ObjCPropertyAccess);
-
// Don't do this for enums, they can't be redeclared.
if (isa<EnumConstantDecl>(D) || isa<EnumDecl>(D))
break;
- bool Warn = !AA->isInherited();
+ bool Warn = !D->getAttr<AvailabilityAttr>()->isInherited();
// Objective-C method declarations in categories are not modelled as
// redeclarations, so manually look for a redeclaration in a category
// if necessary.
f6(0); // expected-error{{'f6' is unavailable: introduced in OS X 10.6}}
}
+struct __attribute__((availability(macosx,strict,introduced=10.6)))
+ not_yet_introduced_struct; // \
+ expected-note{{'not_yet_introduced_struct' has been explicitly marked unavailable here}}
+
+void uses_not_introduced_struct(struct not_yet_introduced_struct *); // \
+ expected-error{{'not_yet_introduced_struct' is unavailable: introduced in OS X 10.6}}
+
+__attribute__((availability(macosx,strict,introduced=10.6)))
+void uses_not_introduced_struct_same_availability(struct not_yet_introduced_struct *);
+
// rdar://10535640
enum {