[cfe-commits] r43152 - in /cfe/trunk/Sema: SemaDecl.cpp SemaExpr.cpp

Steve Naroff snaroff at apple.com
Thu Oct 18 15:17:45 PDT 2007


Author: snaroff
Date: Thu Oct 18 17:17:45 2007
New Revision: 43152

URL: http://llvm.org/viewvc/llvm-project?rev=43152&view=rev
Log:

Add a FIXME to an assert.
Change a dyn_cast_or_null back to cast (which is more efficient).


Modified:
    cfe/trunk/Sema/SemaDecl.cpp
    cfe/trunk/Sema/SemaExpr.cpp

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=43152&r1=43151&r2=43152&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Thu Oct 18 17:17:45 2007
@@ -154,7 +154,7 @@
   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));
 }
 

Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=43152&r1=43151&r2=43152&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Thu Oct 18 17:17:45 2007
@@ -1906,7 +1906,8 @@
     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();





More information about the cfe-commits mailing list