diff options
author | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
commit | 1eb4433ac451dc16f4133a88af2d002ac26c58ef (patch) | |
tree | 07065b80cb7787bb7b9ffcb985196007a57e86f7 /lib/Index/ResolveLocation.cpp | |
parent | 79d39f92590cf2e91bf81486b02cd1156d13ca54 (diff) |
Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/ResolveLocation.cpp')
-rw-r--r-- | lib/Index/ResolveLocation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Index/ResolveLocation.cpp b/lib/Index/ResolveLocation.cpp index ce8512ddf3..281f4d9df1 100644 --- a/lib/Index/ResolveLocation.cpp +++ b/lib/Index/ResolveLocation.cpp @@ -119,7 +119,7 @@ StmtLocResolver::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *Node) { Nodes.push_back(Node->getArg(0)); Nodes.push_back(Node->getCallee()); Nodes.push_back(Node->getArg(1)); - + for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { RangePos RP = CheckRange(Nodes[i]); if (RP == AfterLoc) @@ -201,9 +201,9 @@ ASTLocation DeclLocResolver::VisitFunctionDecl(FunctionDecl *D) { if (RP == ContainsLoc) return Visit(*I); } - + // We didn't find the location in the parameters and we didn't get passed it. - + if (!D->isThisDeclarationADefinition()) return ASTLocation(D); @@ -214,7 +214,7 @@ ASTLocation DeclLocResolver::VisitFunctionDecl(FunctionDecl *D) { I = D->decls_begin(), E = D->decls_end(); I != E; ++I) { if (isa<ParmVarDecl>(*I)) continue; // We already searched through the parameters. - + RangePos RP = CheckRange(*I); if (RP == AfterLoc) break; @@ -223,7 +223,7 @@ ASTLocation DeclLocResolver::VisitFunctionDecl(FunctionDecl *D) { } // We didn't find a declaration that corresponds to the source location. - + // Finally, search through the body of the function. Stmt *Body = D->getBody(); assert(Body && "Expected definition"); @@ -325,10 +325,10 @@ LocResolverBase::RangePos LocResolverBase::CheckRange(SourceRange Range) { Ctx.getLangOptions()); Range.setEnd(Range.getEnd().getFileLocWithOffset(TokSize-1)); - SourceManager &SourceMgr = Ctx.getSourceManager(); + SourceManager &SourceMgr = Ctx.getSourceManager(); if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), Loc)) return BeforeLoc; - + if (SourceMgr.isBeforeInTranslationUnit(Loc, Range.getBegin())) return AfterLoc; @@ -367,6 +367,6 @@ void LocResolverBase::print(Stmt *Node) { ASTLocation idx::ResolveLocationInAST(ASTContext &Ctx, SourceLocation Loc) { if (Loc.isInvalid()) return ASTLocation(); - + return DeclLocResolver(Ctx, Loc).Visit(Ctx.getTranslationUnitDecl()); } |