One can have an unavailable method overridden by an available method,
but not vice-versa. Fix bug introduced in r172567 and noticed by
Jordan, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172586 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 74a6bc5..85f48ec 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -2057,7 +2057,7 @@
!versionsMatch(Deprecated, OldDeprecated, Override) ||
!versionsMatch(Obsoleted, OldObsoleted, Override) ||
!(OldIsUnavailable == IsUnavailable ||
- (Override && OldIsUnavailable && !IsUnavailable))) {
+ (Override && !OldIsUnavailable && IsUnavailable))) {
if (Override) {
int Which = -1;
VersionTuple FirstVersion;