diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-02-22 04:47:24 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-02-22 04:47:24 +0000 |
commit | d8039df5231cb23fe332e70ecb6f064179ec0352 (patch) | |
tree | d0399039d694dde88d0c9c3c61480797f145091f /clang/lib/Sema/SemaExpr.cpp | |
parent | e59c8af7059f2ba1d65ea421a8ba4a739ed80372 (diff) | |
download | bcm5719-llvm-d8039df5231cb23fe332e70ecb6f064179ec0352.tar.gz bcm5719-llvm-d8039df5231cb23fe332e70ecb6f064179ec0352.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<AvailabilityAttr>(); - 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); |