]> granicus.if.org Git - clang/commitdiff
Add a FIXME to an assert.
authorSteve Naroff <snaroff@apple.com>
Thu, 18 Oct 2007 22:17:45 +0000 (22:17 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 18 Oct 2007 22:17:45 +0000 (22:17 +0000)
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

Sema/SemaDecl.cpp
Sema/SemaExpr.cpp

index 9c8ec7f3fa57245adae389d17947cb43949ead36..ee3cc7a88c2e6e3bdb67bf9540d10a8e24b51c83 100644 (file)
@@ -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<TypedefDecl>(VaDecl);
+  TypedefDecl *VaTypedef = cast<TypedefDecl>(VaDecl);
   Context.setBuiltinVaListType(Context.getTypedefType(VaTypedef));
 }
 
index 28c68568622f5e9416e7bdae0353003326cb5f31..281e524350f125ac0a9400827925b03ff85d264d 100644 (file)
@@ -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<ObjcInterfaceDecl>(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();