]> granicus.if.org Git - clang/commitdiff
Fix deserialization of PredefinedExpr in dependent context.
authorAlexey Bataev <a.bataev@hotmail.com>
Sat, 11 Oct 2014 05:07:24 +0000 (05:07 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Sat, 11 Oct 2014 05:07:24 +0000 (05:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219561 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReaderStmt.cpp

index 61e509b254f7f18851f03e3274f3c07ff4eb30b9..7a20f7fed0e7c1132fffee8e9c8d9087a8ef5776 100644 (file)
@@ -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<StringLiteral>(Reader.ReadSubExpr());
+  E->FnName = cast_or_null<StringLiteral>(Reader.ReadSubExpr());
 }
 
 void ASTStmtReader::VisitDeclRefExpr(DeclRefExpr *E) {