Home | History | Annotate | Download | only in ASTDiff

Lines Matching defs:AST

1 //===- ASTDiff.cpp - AST differencing implementation-----------*- C++ -*- -===//
9 // This file contains definitons for the AST differencing interface.
14 #include "clang/AST/ParentMapContext.h"
15 #include "clang/AST/RecursiveASTVisitor.h"
111 /// Represents the AST of a TranslationUnit.
114 Impl(SyntaxTree *Parent, ASTContext &AST);
115 /// Constructs a tree from an AST node.
116 Impl(SyntaxTree *Parent, Decl *N, ASTContext &AST);
117 Impl(SyntaxTree *Parent, Stmt *N, ASTContext &AST);
121 ASTContext &AST)
122 : Impl(Parent, dyn_cast<Stmt>(Node), AST) {}
126 ASTContext &AST)
127 : Impl(Parent, dyn_cast<Decl>(Node), AST) {}
130 ASTContext &AST;
233 if (isNodeExcluded(Tree.AST.getSourceManager(), D))
243 if (isNodeExcluded(Tree.AST.getSourceManager(), S))
252 if (isNodeExcluded(Tree.AST.getSourceManager(), Init))
262 SyntaxTree::Impl::Impl(SyntaxTree *Parent, ASTContext &AST)
263 : Parent(Parent), AST(AST), TypePP(AST.getLangOpts()) {
267 SyntaxTree::Impl::Impl(SyntaxTree *Parent, Decl *N, ASTContext &AST)
268 : Impl(Parent, AST) {
274 SyntaxTree::Impl::Impl(SyntaxTree *Parent, Stmt *N, ASTContext &AST)
275 : Impl(Parent, AST) {
369 else if (AST.getLangOpts().CPlusPlus11)
384 static const DeclContext *getEnclosingDeclContext(ASTContext &AST,
387 const auto &Parents = AST.getParents(*S);
421 llvm_unreachable("Fatal: unhandled AST node.\n");
442 Lexer::getSourceText(Range, AST.getSourceManager(), AST.getLangOpts()));
465 return getRelativeName(D->getDecl(), getEnclosingDeclContext(AST, S));
970 SyntaxTree::SyntaxTree(ASTContext &AST)
972 this, AST.getTranslationUnitDecl(), AST)) {}
976 const ASTContext &SyntaxTree::getASTContext() const { return TreeImpl->AST; }
995 const SourceManager &SrcMgr = TreeImpl->AST.getSourceManager();
999 Range.getEnd(), /*Offset=*/0, SrcMgr, TreeImpl->AST.getLangOpts());