aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-26 03:35:55 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-26 03:35:55 +0000
commitb53e417ba487f4193ef3b0485b420e0fdae643a2 (patch)
tree14884ffa641989b6851088b555f1dd03b42331b4 /lib/Sema/SemaDeclAttr.cpp
parent2234873111009eb8655d63362cedc422eb9fc517 (diff)
Extend the new 'availability' attribute with support for an
'unavailable' argument, which specifies that the declaration to which the attribute appertains is unavailable on that platform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 81bf230f94..6d1a4c86f2 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1091,6 +1091,7 @@ static void HandleAvailabilityAttr(Decl *d, const AttributeList &Attr,
AvailabilityChange Introduced = Attr.getAvailabilityIntroduced();
AvailabilityChange Deprecated = Attr.getAvailabilityDeprecated();
AvailabilityChange Obsoleted = Attr.getAvailabilityObsoleted();
+ bool IsUnavailable = Attr.getUnavailableLoc().isValid();
// Ensure that Introduced < Deprecated < Obsoleted (although not all
// of these steps are needed).
@@ -1122,7 +1123,8 @@ static void HandleAvailabilityAttr(Decl *d, const AttributeList &Attr,
Platform,
Introduced.Version,
Deprecated.Version,
- Obsoleted.Version));
+ Obsoleted.Version,
+ IsUnavailable));
}
static void HandleVisibilityAttr(Decl *d, const AttributeList &Attr, Sema &S) {