From: Steve Naroff Date: Thu, 18 Oct 2007 23:53:51 +0000 (+0000) Subject: Fix the previous (short lived:-) FIXME. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=806a4ebcf5454821186c083c813150d0845493ea;p=clang Fix the previous (short lived:-) FIXME. I didn't realize that GCC considers this a hard error (I thought it was built-in). Since it's not, we should simply emit an error. [dylan:~/llvm/tools/clang] admin% cc -c trivial.m trivial.m:6: error: cannot find interface declaration for 'NSConstantString' [administrators-powerbook59:~/llvm/tools/clang] admin% ../../Debug/bin/clang trivial.m trivial.m:6:16: error: cannot find interface declaration for 'NSConstantString' NSString *s = @"123"; ^ 1 diagnostic generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43157 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index 795f6da6ac..40205d335c 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -1906,8 +1906,9 @@ 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 for NSConstantString" - "FIXME: need to predefine without breaking explicit inclusion"); + if (!strIFace) + return Diag(S->getLocStart(), diag::err_undef_interface, + NSIdent->getName()); Context.setObjcConstantStringInterface(strIFace); } QualType t = Context.getObjcConstantStringInterface(); diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index b086e54ce3..f2f79456e8 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -750,7 +750,6 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; - compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* clang */; projectDirPath = "";