diff options
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/ASTContext.cpp | 7 | ||||
-rw-r--r-- | lib/AST/Decl.cpp | 1 | ||||
-rw-r--r-- | lib/AST/DeclBase.cpp | 2 | ||||
-rw-r--r-- | lib/AST/DeclCXX.cpp | 1 | ||||
-rw-r--r-- | lib/AST/DeclObjC.cpp | 2 | ||||
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/AST/DeclarationName.cpp | 3 | ||||
-rw-r--r-- | lib/AST/Expr.cpp | 2 | ||||
-rw-r--r-- | lib/AST/ExprConstant.cpp | 1 | ||||
-rw-r--r-- | lib/AST/ItaniumMangle.cpp | 3 | ||||
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 9 | ||||
-rw-r--r-- | lib/AST/TemplateBase.cpp | 2 |
12 files changed, 1 insertions, 34 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index de77cb66cf..5e0143dc00 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -3219,7 +3219,6 @@ ASTContext::getCanonicalTemplateArgument(const TemplateArgument &Arg) const { // Silence GCC warning llvm_unreachable("Unhandled template argument kind"); - return TemplateArgument(); } NestedNameSpecifier * @@ -4919,7 +4918,6 @@ CanQualType ASTContext::getFromTargetType(unsigned Type) const { } llvm_unreachable("Unhandled TargetInfo::IntType value"); - return CanQualType(); } //===----------------------------------------------------------------------===// @@ -5749,13 +5747,11 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, #define DEPENDENT_TYPE(Class, Base) case Type::Class: #include "clang/AST/TypeNodes.def" llvm_unreachable("Non-canonical and dependent types shouldn't get here"); - return QualType(); case Type::LValueReference: case Type::RValueReference: case Type::MemberPointer: llvm_unreachable("C++ should never be in mergeTypes"); - return QualType(); case Type::ObjCInterface: case Type::IncompleteArray: @@ -5763,7 +5759,6 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, case Type::FunctionProto: case Type::ExtVector: llvm_unreachable("Types are eliminated above"); - return QualType(); case Type::Pointer: { @@ -6015,7 +6010,6 @@ QualType ASTContext::getCorrespondingUnsignedType(QualType T) { return UnsignedInt128Ty; default: llvm_unreachable("Unexpected signed integer type"); - return QualType(); } } @@ -6476,7 +6470,6 @@ MangleContext *ASTContext::createMangleContext() { return createMicrosoftMangleContext(*this, getDiagnostics()); } llvm_unreachable("Unsupported ABI"); - return 0; } CXXABI::~CXXABI() {} diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 2fdb9654b0..a4608eb81c 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1891,7 +1891,6 @@ FunctionDecl::TemplatedKind FunctionDecl::getTemplatedKind() const { return TK_DependentFunctionTemplateSpecialization; llvm_unreachable("Did we miss a TemplateOrSpecialization type?"); - return TK_NonTemplate; } FunctionDecl *FunctionDecl::getInstantiatedFromMemberFunction() const { diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index d1f8b1c7fd..60fb7025ab 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -572,7 +572,6 @@ Decl *Decl::castFromDeclContext (const DeclContext *D) { return static_cast<NAME##Decl*>(const_cast<DeclContext*>(D)); #include "clang/AST/DeclNodes.inc" llvm_unreachable("a decl that inherits DeclContext isn't handled"); - return 0; } } @@ -592,7 +591,6 @@ DeclContext *Decl::castToDeclContext(const Decl *D) { return static_cast<NAME##Decl*>(const_cast<Decl*>(D)); #include "clang/AST/DeclNodes.inc" llvm_unreachable("a decl that inherits DeclContext isn't handled"); - return 0; } } diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index b9af8e3a1f..9addece6f9 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -1694,7 +1694,6 @@ static const char *getAccessName(AccessSpecifier AS) { default: case AS_none: llvm_unreachable("Invalid access specifier!"); - return 0; case AS_public: return "public"; case AS_private: diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 68177de70d..97f215fb7f 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -550,7 +550,6 @@ ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() { assert(!isa<ObjCProtocolDecl>(getDeclContext()) && "It's a protocol method"); llvm_unreachable("unknown method context"); - return 0; } //===----------------------------------------------------------------------===// @@ -782,7 +781,6 @@ const ObjCInterfaceDecl *ObjCIvarDecl::getContainingInterface() const { case ObjCCategoryImpl: case ObjCProtocol: llvm_unreachable("invalid ivar container!"); - return 0; // Ivars can only appear in class extension categories. case ObjCCategory: { diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index a17e14053c..8d8ec2f7d2 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -192,7 +192,7 @@ void DeclPrinter::ProcessDeclGroup(SmallVectorImpl<Decl*>& Decls) { void DeclPrinter::Print(AccessSpecifier AS) { switch(AS) { - case AS_none: llvm_unreachable("No access specifier!"); break; + case AS_none: llvm_unreachable("No access specifier!"); case AS_public: Out << "public"; break; case AS_protected: Out << "protected"; break; case AS_private: Out << "private"; break; diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp index 84d4ca94c3..8dfca3e1e7 100644 --- a/lib/AST/DeclarationName.cpp +++ b/lib/AST/DeclarationName.cpp @@ -194,7 +194,6 @@ DeclarationName::NameKind DeclarationName::getNameKind() const { // Can't actually get here. llvm_unreachable("This should be unreachable!"); - return Identifier; } bool DeclarationName::isDependentName() const { @@ -340,7 +339,6 @@ void *DeclarationName::getFETokenInfoAsVoid() const { default: llvm_unreachable("Declaration name has no FETokenInfo"); } - return 0; } void DeclarationName::setFETokenInfo(void *T) { @@ -622,5 +620,4 @@ SourceLocation DeclarationNameInfo::getEndLoc() const { return NameLoc; } llvm_unreachable("Unexpected declaration name kind"); - return SourceLocation(); } diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index ba191a8c80..6049f289f8 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -2503,8 +2503,6 @@ Expr::isNullPointerConstant(ASTContext &Ctx, switch (NPC) { case NPC_NeverValueDependent: llvm_unreachable("Unexpected value dependent expression!"); - // If the unthinkable happens, fall through to the safest alternative. - case NPC_ValueDependentIsNull: if (isTypeDependent() || getType()->isIntegralType(Ctx)) return NPCK_ZeroInteger; diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 2d4b07021c..2de72f392e 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -389,7 +389,6 @@ public: RetTy VisitStmt(const Stmt *) { llvm_unreachable("Expression evaluator should not be called on stmts"); - return DerivedError(0); } RetTy VisitExpr(const Expr *E) { return DerivedError(E); diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp index ab6ec4e6a1..78f149c2df 100644 --- a/lib/AST/ItaniumMangle.cpp +++ b/lib/AST/ItaniumMangle.cpp @@ -1070,7 +1070,6 @@ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, case DeclarationName::ObjCOneArgSelector: case DeclarationName::ObjCMultiArgSelector: llvm_unreachable("Can't mangle Objective-C selector names here!"); - break; case DeclarationName::CXXConstructorName: if (ND == Structor) @@ -1125,7 +1124,6 @@ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, case DeclarationName::CXXUsingDirective: llvm_unreachable("Can't mangle a using directive name!"); - break; } } @@ -1513,7 +1511,6 @@ CXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO, unsigned Arity) { case OO_None: case NUM_OVERLOADED_OPERATORS: llvm_unreachable("Not an overloaded operator"); - break; } } diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index fd90883bdf..fd99ee189b 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -333,15 +333,12 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, case DeclarationName::ObjCOneArgSelector: case DeclarationName::ObjCMultiArgSelector: llvm_unreachable("Can't mangle Objective-C selector names here!"); - break; case DeclarationName::CXXConstructorName: llvm_unreachable("Can't mangle constructors yet!"); - break; case DeclarationName::CXXDestructorName: llvm_unreachable("Can't mangle destructors yet!"); - break; case DeclarationName::CXXConversionFunctionName: // <operator-name> ::= ?B # (cast) @@ -356,11 +353,9 @@ MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, case DeclarationName::CXXLiteralOperatorName: // FIXME: Was this added in VS2010? Does MS even know how to mangle this? llvm_unreachable("Don't know how to mangle literal operators yet!"); - break; case DeclarationName::CXXUsingDirective: llvm_unreachable("Can't mangle a using directive name!"); - break; } } @@ -514,12 +509,10 @@ void MicrosoftCXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO) { case OO_Conditional: llvm_unreachable("Don't know how to mangle ?:"); - break; case OO_None: case NUM_OVERLOADED_OPERATORS: llvm_unreachable("Not an overloaded operator"); - break; } } @@ -714,7 +707,6 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T) { case BuiltinType::BoundMember: llvm_unreachable( "Overloaded and dependent types shouldn't get to name mangling"); - break; case BuiltinType::ObjCId: Out << "PAUobjc_object@@"; break; case BuiltinType::ObjCClass: Out << "PAUobjc_class@@"; break; case BuiltinType::ObjCSel: Out << "PAUobjc_selector@@"; break; @@ -723,7 +715,6 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T) { case BuiltinType::Char32: case BuiltinType::NullPtr: llvm_unreachable("Don't know how to mangle this type"); - break; } } diff --git a/lib/AST/TemplateBase.cpp b/lib/AST/TemplateBase.cpp index b780012557..0c011a8ef0 100644 --- a/lib/AST/TemplateBase.cpp +++ b/lib/AST/TemplateBase.cpp @@ -69,7 +69,6 @@ bool TemplateArgument::isDependent() const { switch (getKind()) { case Null: llvm_unreachable("Should not have a NULL template argument"); - return false; case Type: return getAsType()->isDependentType(); @@ -108,7 +107,6 @@ bool TemplateArgument::isInstantiationDependent() const { switch (getKind()) { case Null: llvm_unreachable("Should not have a NULL template argument"); - return false; case Type: return getAsType()->isInstantiationDependentType(); |