bool Sema::mergeDeclAttribute(Decl *D, InheritableAttr *Attr) {
InheritableAttr *NewAttr = NULL;
- if (AvailabilityAttr *AA = dyn_cast<AvailabilityAttr>(Attr))
+ if (AvailabilityAttr *AA = dyn_cast<AvailabilityAttr>(Attr)) {
NewAttr = mergeAvailabilityAttr(D, AA->getRange(), AA->getPlatform(),
AA->getIntroduced(), AA->getDeprecated(),
AA->getObsoleted(), AA->getUnavailable(),
AA->getMessage());
- else if (VisibilityAttr *VA = dyn_cast<VisibilityAttr>(Attr)) {
+ if (NewAttr) {
+ NamedDecl *ND = cast<NamedDecl>(D);
+ ND->ClearLVCache();
+ }
+ } else if (VisibilityAttr *VA = dyn_cast<VisibilityAttr>(Attr)) {
NewAttr = mergeVisibilityAttr(D, VA->getRange(), VA->getVisibility());
if (NewAttr) {
NamedDecl *ND = cast<NamedDecl>(D);
#if !__has_feature(attribute_availability_with_message)
# error "Missing __has_feature"
#endif
+
+extern int x __attribute__((availability(macosx,introduced=10.5)));
+extern int x;