aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-10 15:31:35 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-10 15:31:35 +0000
commit3b6b7accb55980b149571d44e96f92dae500b0a9 (patch)
tree3b0ec7b7d974d7f3f560cff0c32bdc088c102725 /lib/Sema/SemaDeclAttr.cpp
parent4dc41c9b766140b507980a13acccf2f05ed19cd3 (diff)
For the availability attribute, allow a declaration to be deprecated
in the same version that it is introduced. Stuff happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 0644103b44..419adefa12 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1507,7 +1507,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
// Ensure that Introduced < Deprecated < Obsoleted (although not all
// of these steps are needed).
if (Introduced.isValid() && Deprecated.isValid() &&
- !(Introduced.Version < Deprecated.Version)) {
+ !(Introduced.Version <= Deprecated.Version)) {
S.Diag(Introduced.KeywordLoc, diag::warn_availability_version_ordering)
<< 1 << PlatformName << Deprecated.Version.getAsString()
<< 0 << Introduced.Version.getAsString();
@@ -1515,7 +1515,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
}
if (Introduced.isValid() && Obsoleted.isValid() &&
- !(Introduced.Version < Obsoleted.Version)) {
+ !(Introduced.Version <= Obsoleted.Version)) {
S.Diag(Introduced.KeywordLoc, diag::warn_availability_version_ordering)
<< 2 << PlatformName << Obsoleted.Version.getAsString()
<< 0 << Introduced.Version.getAsString();
@@ -1523,7 +1523,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
}
if (Deprecated.isValid() && Obsoleted.isValid() &&
- !(Deprecated.Version < Obsoleted.Version)) {
+ !(Deprecated.Version <= Obsoleted.Version)) {
S.Diag(Deprecated.KeywordLoc, diag::warn_availability_version_ordering)
<< 2 << PlatformName << Obsoleted.Version.getAsString()
<< 1 << Deprecated.Version.getAsString();