diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-05 22:21:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-05 22:21:40 +0000 |
commit | 49dd5851c463963a8a78f5222ea72cfaa6db1029 (patch) | |
tree | b3f0c18546028a6cb867f72185ffdf341e1b679d /lib/Frontend/ResolveLocation.cpp | |
parent | c0824634334ff0bb66cf8fb260101a5faaebf4b7 (diff) |
Make use of ASTNode for return value of clang::ResolveLocationInAST() and in the index-test tool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ResolveLocation.cpp')
-rw-r--r-- | lib/Frontend/ResolveLocation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/ResolveLocation.cpp b/lib/Frontend/ResolveLocation.cpp index fd5cacf127..3dcd2143cb 100644 --- a/lib/Frontend/ResolveLocation.cpp +++ b/lib/Frontend/ResolveLocation.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/Frontend/Utils.h" +#include "clang/AST/ASTNode.h" #include "clang/AST/DeclVisitor.h" #include "clang/AST/StmtVisitor.h" #include "clang/Lex/Lexer.h" @@ -313,12 +314,11 @@ void LocResolverBase::print(Stmt *Node) { /// \brief Returns the AST node that a source location points to. /// -std::pair<Decl *, Stmt *> -clang::ResolveLocationInAST(ASTContext &Ctx, SourceLocation Loc) { +ASTNode clang::ResolveLocationInAST(ASTContext &Ctx, SourceLocation Loc) { if (Loc.isInvalid()) - return std::make_pair((Decl*)0, (Stmt*)0); + return ASTNode(); DeclLocResolver DLR(Ctx, Loc); DLR.Visit(Ctx.getTranslationUnitDecl()); - return DLR.getResult(); + return ASTNode(DLR.getDecl(), DLR.getStmt()); } |