-Wunguarded-availability should support if (@available) checks in top-level
authorAlex Lorenz <arphaman@gmail.com>
Wed, 26 Apr 2017 14:20:02 +0000 (14:20 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 26 Apr 2017 14:20:02 +0000 (14:20 +0000)
commit28559ceecea1e4506fb1afcd19f871c887c5afb7
tree11fdaa7ce21956f198f2092b7485c878ce703065
parente2ec05a62a4d14918d828294b219a909dc07bcb5
-Wunguarded-availability should support if (@available) checks in top-level
blocks and lambdas

Prior to this commit Clang emitted the old "partial availability" warning for
expressions that referred to declarations that were not yet introduced in
blocks and lambdas that were not in a function/method. This commit ensures that
top-level blocks and lambdas use the new unguarded availability checks.

rdar://31835952

llvm-svn: 301409
clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaObjC/unguarded-availability.m