forked from OSchip/llvm-project
Defensively ensure that GetExternalDeclStmt protects itself from nested deserialization
llvm-svn: 297322
This commit is contained in:
parent
d1ba16e762
commit
9fd16f84c6
|
@ -6811,6 +6811,9 @@ Stmt *ASTReader::GetExternalDeclStmt(uint64_t Offset) {
|
|||
// Offset here is a global offset across the entire chain.
|
||||
RecordLocation Loc = getLocalBitOffset(Offset);
|
||||
Loc.F->DeclsCursor.JumpToBit(Loc.Offset);
|
||||
assert(NumCurrentElementsDeserializing == 0 &&
|
||||
"should not be called while already deserializing");
|
||||
Deserializing D(this);
|
||||
return ReadStmtFromStream(*Loc.F);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue