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
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();
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
- compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";