From 11289f42807681deee5551c40fe1a4282d54c86a Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 9 Sep 2009 15:08:12 +0000 Subject: Remove tabs, and whitespace cleanups. llvm-svn: 81346 --- clang/lib/Index/ASTLocation.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'clang/lib/Index/ASTLocation.cpp') diff --git a/clang/lib/Index/ASTLocation.cpp b/clang/lib/Index/ASTLocation.cpp index f010a2bcc84..d6f5cc7cfba 100644 --- a/clang/lib/Index/ASTLocation.cpp +++ b/clang/lib/Index/ASTLocation.cpp @@ -32,7 +32,7 @@ static Decl *getDeclFromExpr(Stmt *E) { return getDeclFromExpr(CE->getCallee()); if (CastExpr *CE = dyn_cast(E)) return getDeclFromExpr(CE->getSubExpr()); - + return 0; } @@ -41,7 +41,7 @@ Decl *ASTLocation::getReferencedDecl() { return 0; if (isDecl()) return getDecl(); - + assert(getStmt()); return getDeclFromExpr(getStmt()); } @@ -49,17 +49,17 @@ Decl *ASTLocation::getReferencedDecl() { static bool isContainedInStatement(Stmt *Node, Stmt *Parent) { assert(Node && Parent && "Passed null Node or Parent"); - + if (Node == Parent) return true; - + for (Stmt::child_iterator I = Parent->child_begin(), E = Parent->child_end(); I != E; ++I) { if (*I) if (isContainedInStatement(Node, *I)) return true; } - + return false; } @@ -76,7 +76,7 @@ Decl *ASTLocation::FindImmediateParent(Decl *D, Stmt *Node) { if (FunctionDecl *FD = dyn_cast(D)) { if (!FD->isThisDeclarationADefinition()) return 0; - + for (DeclContext::decl_iterator I = FD->decls_begin(), E = FD->decls_end(); I != E; ++I) { Decl *Child = FindImmediateParent(*I, Node); @@ -138,7 +138,7 @@ void ASTLocation::print(llvm::raw_ostream &OS) const { OS << "[Decl: " << getDecl()->getDeclKindName() << " "; if (const NamedDecl *ND = dyn_cast(getDecl())) OS << ND->getNameAsString(); - + if (getStmt()) { ASTContext &Ctx = getDecl()->getASTContext(); OS << " | Stmt: " << getStmt()->getStmtClassName() << " "; @@ -146,7 +146,7 @@ void ASTLocation::print(llvm::raw_ostream &OS) const { } OS << "] <"; - + SourceRange Range = getSourceRange(); SourceManager &SourceMgr = getDecl()->getASTContext().getSourceManager(); Range.getBegin().print(OS, SourceMgr); -- cgit v1.2.3