From: Chris Lattner Date: Sun, 16 Sep 2007 19:23:47 +0000 (+0000) Subject: fix some warnings, patch by Justin Handville X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1776cb8d35dfa80bfd8606e58b8ade30dcd2438;p=clang fix some warnings, patch by Justin Handville git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42010 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp index 87f68fed24..89da7dc867 100644 --- a/AST/ASTContext.cpp +++ b/AST/ASTContext.cpp @@ -730,6 +730,9 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain( } } assert(0 && "getFloatingTypeOfSizeWithinDomain(): illegal domain"); + //an invalid return value, but the assert + //will ensure that this code is never reached. + return VoidTy; } /// compareFloatingType - Handles 3 different combos: diff --git a/CodeGen/CGExpr.cpp b/CodeGen/CGExpr.cpp index 64fa549a05..d896c95097 100644 --- a/CodeGen/CGExpr.cpp +++ b/CodeGen/CGExpr.cpp @@ -134,6 +134,9 @@ RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, QualType ExprType) { return EmitLoadOfOCUElementLValue(LV, ExprType); assert(0 && "Bitfield ref not impl!"); + //an invalid RValue, but the assert will + //ensure that this point is never reached + return RValue(); } // If this is a reference to a subset of the elements of a vector, either @@ -270,6 +273,9 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { return LValue::MakeAddr(CGM.GetAddrOfGlobalDecl(D)); } assert(0 && "Unimp declref"); + //an invalid LValue, but the assert will + //ensure that this point is never reached. + return LValue(); } LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) { diff --git a/CodeGen/CodeGenTypes.cpp b/CodeGen/CodeGenTypes.cpp index 46668e45d8..21a359fe70 100644 --- a/CodeGen/CodeGenTypes.cpp +++ b/CodeGen/CodeGenTypes.cpp @@ -136,6 +136,11 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) { return llvm::FunctionType::get(ResultType, ArgTys, isVarArg, 0); } + + case Type::ObjcInterface: + assert(0 && "FIXME: add missing functionality here"); + break; + case Type::Tagged: const TagType &TT = cast(Ty); const TagDecl *TD = TT.getDecl();