From: Steve Naroff Date: Thu, 18 Oct 2007 22:17:45 +0000 (+0000) Subject: Add a FIXME to an assert. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=733002fac5e56a7f8b6dd4368a294f522718fcd2;p=clang Add a FIXME to an assert. Change a dyn_cast_or_null back to cast (which is more efficient). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43152 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index 9c8ec7f3fa..ee3cc7a88c 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -154,7 +154,7 @@ void Sema::InitBuiltinVaListType() IdentifierInfo *VaIdent = &Context.Idents.get("__builtin_va_list"); ScopedDecl *VaDecl = LookupScopedDecl(VaIdent, Decl::IDNS_Ordinary, SourceLocation(), TUScope); - TypedefDecl *VaTypedef = dyn_cast_or_null(VaDecl); + TypedefDecl *VaTypedef = cast(VaDecl); Context.setBuiltinVaListType(Context.getTypedefType(VaTypedef)); } diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index 28c6856862..281e524350 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -1906,7 +1906,8 @@ Sema::ExprResult Sema::ParseObjCStringLiteral(ExprTy *string) { ScopedDecl *IFace = LookupScopedDecl(NSIdent, Decl::IDNS_Ordinary, SourceLocation(), TUScope); ObjcInterfaceDecl *strIFace = dyn_cast_or_null(IFace); - assert(strIFace && "missing '@interface NSConstantString'"); + assert(strIFace && "missing @interface for NSConstantString" + "FIXME: need to predefine without breaking explicit inclusion"); Context.setObjcConstantStringInterface(strIFace); } QualType t = Context.getObjcConstantStringInterface();