From: Alexey Bataev Date: Sat, 11 Oct 2014 05:07:24 +0000 (+0000) Subject: Fix deserialization of PredefinedExpr in dependent context. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d52c445118349a7745a8f5679ff7abb67a164f40;p=clang Fix deserialization of PredefinedExpr in dependent context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219561 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp index 61e509b254..7a20f7fed0 100644 --- a/lib/Serialization/ASTReaderStmt.cpp +++ b/lib/Serialization/ASTReaderStmt.cpp @@ -423,7 +423,7 @@ void ASTStmtReader::VisitPredefinedExpr(PredefinedExpr *E) { VisitExpr(E); E->setLocation(ReadSourceLocation(Record, Idx)); E->Type = (PredefinedExpr::IdentType)Record[Idx++]; - E->FnName = cast(Reader.ReadSubExpr()); + E->FnName = cast_or_null(Reader.ReadSubExpr()); } void ASTStmtReader::VisitDeclRefExpr(DeclRefExpr *E) {