summaryrefslogtreecommitdiffstats
path: root/clang/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
commit7ab142b55a6efedfeedfb54aae85878509cc82d1 (patch)
treed46fb848d43338e23796c1b4f1ed08879652d942 /clang/lib/Sema/SemaDeclAttr.cpp
parent785359525354436f91455f7d5bf5cbe36bdbd227 (diff)
downloadbcm5719-llvm-7ab142b55a6efedfeedfb54aae85878509cc82d1.tar.gz
bcm5719-llvm-7ab142b55a6efedfeedfb54aae85878509cc82d1.zip
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. llvm-svn: 128329
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 81bf230f942..6d1a4c86f28 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud