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 | 11289f42807681deee5551c40fe1a4282d54c86a (patch) | |
| tree | 97ed01bf613ec21a6dc3d53097c925fc6353c9f9 /clang/lib/Index/ASTLocation.cpp | |
| parent | 16ad903fcf596916257acef39618545de331db8f (diff) | |
| download | bcm5719-llvm-11289f42807681deee5551c40fe1a4282d54c86a.tar.gz bcm5719-llvm-11289f42807681deee5551c40fe1a4282d54c86a.zip | |
Remove tabs, and whitespace cleanups.
llvm-svn: 81346
Diffstat (limited to 'clang/lib/Index/ASTLocation.cpp')
| -rw-r--r-- | clang/lib/Index/ASTLocation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<CastExpr>(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<FunctionDecl>(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<NamedDecl>(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); |

