[Sema] Refactor context checking for availability diagnostics
authorErik Pilkington <erik.pilkington@gmail.com>
Fri, 14 Oct 2016 19:08:01 +0000 (19:08 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Fri, 14 Oct 2016 19:08:01 +0000 (19:08 +0000)
commit88eff2575e77b2a67ae394f95e3850d3c746ad28
tree549b3b3f05175a772395e0d776cc5f068500280f
parent775a20913d1547e0dad374bf44733c200afa8132
[Sema] Refactor context checking for availability diagnostics

This commit combines a couple of redundant functions that do availability
attribute context checking into a more correct/simpler one.

Differential revision: https://reviews.llvm.org/D25283

llvm-svn: 284265
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaObjC/class-unavail-warning.m