diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2016-10-14 19:08:01 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2016-10-14 19:08:01 +0000 |
commit | 88eff2575e77b2a67ae394f95e3850d3c746ad28 (patch) | |
tree | 549b3b3f05175a772395e0d776cc5f068500280f /clang/include | |
parent | 775a20913d1547e0dad374bf44733c200afa8132 (diff) | |
download | bcm5719-llvm-88eff2575e77b2a67ae394f95e3850d3c746ad28.tar.gz bcm5719-llvm-88eff2575e77b2a67ae394f95e3850d3c746ad28.zip |
[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
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Sema/Sema.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index d0f62d9d37b..ba63555284b 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -9889,23 +9889,16 @@ public: return OriginalLexicalContext ? OriginalLexicalContext : CurContext; } - AvailabilityResult getCurContextAvailability() const; - - /// \brief Get the verison that this context implies. - /// For instance, a method in an interface that is annotated with an - /// availability attribuite effectively has the availability of the interface. - VersionTuple getVersionForDecl(const Decl *Ctx) const; - /// \brief The diagnostic we should emit for \c D, or \c AR_Available. /// /// \param D The declaration to check. Note that this may be altered to point /// to another declaration that \c D gets it's availability from. i.e., we /// walk the list of typedefs to find an availability attribute. /// - /// \param ContextVersion The version to compare availability against. - AvailabilityResult - ShouldDiagnoseAvailabilityOfDecl(NamedDecl *&D, VersionTuple ContextVersion, - std::string *Message); + /// \param Message If non-null, this will be populated with the message from + /// the availability attribute that is selected. + AvailabilityResult ShouldDiagnoseAvailabilityOfDecl(NamedDecl *&D, + std::string *Message); const DeclContext *getCurObjCLexicalContext() const { const DeclContext *DC = getCurLexicalContext(); |