summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2016-10-18 15:26:43 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2016-10-18 15:26:43 +0000
commitd080746c1995a6cf095d094002aef88938507ce2 (patch)
treec9c219f5e9e6daf208c3c7f7aa3188b8979fcaa0 /clang/include
parent858915f054ef80a89d285ffb4b0a50e32b08defe (diff)
downloadbcm5719-llvm-d080746c1995a6cf095d094002aef88938507ce2.tar.gz
bcm5719-llvm-d080746c1995a6cf095d094002aef88938507ce2.zip
Revert r284265 "[Sema] Refactor context checking for availability diagnostics"
This has a bug in it, pointed out by Bob Wilson! llvm-svn: 284486
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Sema/Sema.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index e91b7756278..dce637fbd2f 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -9890,16 +9890,23 @@ 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 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);
+ /// \param ContextVersion The version to compare availability against.
+ AvailabilityResult
+ ShouldDiagnoseAvailabilityOfDecl(NamedDecl *&D, VersionTuple ContextVersion,
+ std::string *Message);
const DeclContext *getCurObjCLexicalContext() const {
const DeclContext *DC = getCurLexicalContext();
OpenPOWER on IntegriCloud