From d8039df5231cb23fe332e70ecb6f064179ec0352 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 22 Feb 2016 04:47:24 +0000 Subject: Addressing review comments for r261163. Use "strict" instead of "nopartial". Also make strictly not-introduced share the same diagnostics as Obsolete and Unavailable. rdar://23791325 llvm-svn: 261512 --- clang/lib/Sema/SemaExpr.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index ad6280d6c74..bfbca298ce8 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -159,12 +159,11 @@ DiagnoseAvailabilityOfDecl(Sema &S, NamedDecl *D, SourceLocation Loc, break; case AR_NotYetIntroduced: { - // With nopartial, the compiler will emit delayed error just like how - // "deprecated, unavailable" are handled. + // With strict, the compiler will emit unavailable error. AvailabilityAttr *AA = D->getAttr(); - if (AA && AA->getNopartial() && + if (AA && AA->getStrict() && S.getCurContextAvailability() != AR_NotYetIntroduced) - S.EmitAvailabilityWarning(Sema::AD_NotYetIntroduced, + S.EmitAvailabilityWarning(Sema::AD_Unavailable, D, Message, Loc, UnknownObjCClass, ObjCPDecl, ObjCPropertyAccess); -- cgit v1.2.3