It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74505
91177308-0d34-0410-b5e6-
96231b3b80d8
const DeclContext *getLexicalParent() const {
return const_cast<DeclContext*>(this)->getLexicalParent();
}
-
+
+ ASTContext &getParentASTContext() const {
+ return cast<Decl>(this)->getASTContext();
+ }
+
bool isFunctionOrMethod() const {
switch (DeclKind) {
case Decl::Block: