aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sema/SemaDecl.cpp2
-rw-r--r--Sema/SemaExpr.cpp6
-rw-r--r--clang.xcodeproj/project.pbxproj1
3 files changed, 4 insertions, 5 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 62f3fabe7d..232c5ba2e2 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -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 = cast<TypedefDecl>(VaDecl);
+ TypedefDecl *VaTypedef = dyn_cast_or_null<TypedefDecl>(VaDecl);
Context.setBuiltinVaListType(Context.getTypedefType(VaTypedef));
}
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 29a3b667be..8ee0913f99 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1896,9 +1896,9 @@ Sema::ExprResult Sema::ParseObjCStringLiteral(ExprTy *string) {
IdentifierInfo *NSIdent = &Context.Idents.get("NSConstantString");
ScopedDecl *IFace = LookupScopedDecl(NSIdent, Decl::IDNS_Ordinary,
SourceLocation(), TUScope);
- ObjcInterfaceDecl *stringInterface = cast<ObjcInterfaceDecl>(IFace);
- assert(stringInterface && "missing '@interface NSConstantString'");
- Context.setObjcConstantStringInterface(stringInterface);
+ ObjcInterfaceDecl *strIFace = dyn_cast_or_null<ObjcInterfaceDecl>(IFace);
+ assert(strIFace && "missing '@interface NSConstantString'");
+ Context.setObjcConstantStringInterface(strIFace);
}
QualType t = Context.getObjcConstantStringInterface();
t = Context.getPointerType(t);
diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj
index 75d938806b..b88c381faa 100644
--- a/clang.xcodeproj/project.pbxproj
+++ b/clang.xcodeproj/project.pbxproj
@@ -742,7 +742,6 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
- compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";