[cfe-commits] r43157 - in /cfe/trunk: Sema/SemaExpr.cpp clang.xcodeproj/project.pbxproj

Steve Naroff snaroff at apple.com
Thu Oct 18 16:53:52 PDT 2007


Author: snaroff
Date: Thu Oct 18 18:53:51 2007
New Revision: 43157

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

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.


Modified:
    cfe/trunk/Sema/SemaExpr.cpp
    cfe/trunk/clang.xcodeproj/project.pbxproj

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

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Thu Oct 18 18:53:51 2007
@@ -1906,8 +1906,9 @@
     ScopedDecl *IFace = LookupScopedDecl(NSIdent, Decl::IDNS_Ordinary, 
                                          SourceLocation(), TUScope);
     ObjcInterfaceDecl *strIFace = dyn_cast_or_null<ObjcInterfaceDecl>(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();

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=43157&r1=43156&r2=43157&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Thu Oct 18 18:53:51 2007
@@ -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 = "";





More information about the cfe-commits mailing list