diff options
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index e60cd63369..63714fdfa7 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1624,12 +1624,19 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, return; } + StringRef Str; + const StringLiteral *SE = + dyn_cast_or_null<const StringLiteral>(Attr.getMessageExpr()); + if (SE) + Str = SE->getString(); + D->addAttr(::new (S.Context) AvailabilityAttr(Attr.getRange(), S.Context, Platform, Introduced.Version, Deprecated.Version, Obsoleted.Version, - IsUnavailable)); + IsUnavailable, + Str)); } static void handleVisibilityAttr(Sema &S, Decl *D, const AttributeList &Attr) { |