From 0bae624934ccee9434893025fc80cfd4bbd8eec8 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 25 Aug 2016 00:34:00 +0000 Subject: Lazily load the ContextDecl for a lambda's DefinitionData, to fix a deserialization cycle caused by the ContextDecl recursively importing members of the lambda's closure type. llvm-svn: 279694 --- clang/lib/Serialization/ASTReaderDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp') diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 04231cd8e0b..e00c9561cd8 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1539,7 +1539,7 @@ void ASTDeclReader::ReadCXXDefinitionData( Lambda.NumCaptures = Record[Idx++]; Lambda.NumExplicitCaptures = Record[Idx++]; Lambda.ManglingNumber = Record[Idx++]; - Lambda.ContextDecl = ReadDecl(Record, Idx); + Lambda.ContextDecl = ReadDeclID(Record, Idx); Lambda.Captures = (Capture*)Reader.Context.Allocate(sizeof(Capture)*Lambda.NumCaptures); Capture *ToCapture = Lambda.Captures; -- cgit v1.2.3