diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /lib/Index/ASTLocation.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'lib/Index/ASTLocation.cpp')
-rw-r--r-- | lib/Index/ASTLocation.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Index/ASTLocation.cpp b/lib/Index/ASTLocation.cpp index 66b393e..fce6099 100644 --- a/lib/Index/ASTLocation.cpp +++ b/lib/Index/ASTLocation.cpp @@ -41,7 +41,6 @@ Decl *ASTLocation::getReferencedDecl() { return 0; switch (getKind()) { - default: llvm_unreachable("Invalid Kind"); case N_Type: return 0; case N_Decl: @@ -51,8 +50,8 @@ Decl *ASTLocation::getReferencedDecl() { case N_Stmt: return getDeclFromExpr(Stm); } - - return 0; + + llvm_unreachable("Invalid ASTLocation Kind!"); } SourceRange ASTLocation::getSourceRange() const { @@ -60,7 +59,6 @@ SourceRange ASTLocation::getSourceRange() const { return SourceRange(); switch (getKind()) { - default: llvm_unreachable("Invalid Kind"); case N_Decl: return D->getSourceRange(); case N_Stmt: @@ -70,8 +68,8 @@ SourceRange ASTLocation::getSourceRange() const { case N_Type: return AsTypeLoc().getLocalSourceRange(); } - - return SourceRange(); + + llvm_unreachable("Invalid ASTLocation Kind!"); } void ASTLocation::print(raw_ostream &OS) const { @@ -91,7 +89,7 @@ void ASTLocation::print(raw_ostream &OS) const { case N_Stmt: OS << "[Stmt: " << AsStmt()->getStmtClassName() << " "; - AsStmt()->printPretty(OS, Ctx, 0, PrintingPolicy(Ctx.getLangOptions())); + AsStmt()->printPretty(OS, Ctx, 0, PrintingPolicy(Ctx.getLangOpts())); break; case N_NamedRef: |