More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 7fc0700..a92dafb 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -124,7 +124,6 @@
#include "clang/AST/StmtNodes.inc"
}
llvm_unreachable("unknown statement kind");
- return SourceLocation();
}
//===----------------------------------------------------------------------===//
@@ -1213,7 +1212,6 @@
}
llvm_unreachable("Unhandled cast kind!");
- return 0;
}
Expr *CastExpr::getSubExprAsWritten() {
@@ -1255,7 +1253,6 @@
#include "clang/AST/StmtNodes.inc"
default:
llvm_unreachable("non-cast expressions not possible here");
- return 0;
}
}
@@ -1343,7 +1340,7 @@
case BO_Comma: return ",";
}
- return "";
+ llvm_unreachable("Invalid OpCode!");
}
BinaryOperatorKind
@@ -3015,7 +3012,7 @@
return getSuperLoc();
}
- return SourceLocation();
+ llvm_unreachable("Invalid ReceiverKind!");
}
Selector ObjCMessageExpr::getSelector() const {
@@ -3064,8 +3061,8 @@
case OBC_BridgeRetained:
return "__bridge_retained";
}
-
- return "__bridge";
+
+ llvm_unreachable("Invalid BridgeKind!");
}
bool ChooseExpr::isConditionTrue(const ASTContext &C) const {