PR48434: Work around crashes due to deserialization cycles via typedefs.
authorRichard Smith <richard@metafoo.co.uk>
Wed, 9 Dec 2020 20:04:03 +0000 (12:04 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 9 Dec 2020 20:22:35 +0000 (12:22 -0800)
commit997a719d5a70100fcbbec1e51ce44cd66041bddc
tree5bdcdc6cf4723379b48a2ab45edaff55c7cef50c
parentbaef18dffba1a2f91b47b484ac2233dfcf923f9b
PR48434: Work around crashes due to deserialization cycles via typedefs.

Ensure that we can deserialize a TypedefType even while in the middle of
deserializing its TypedefDecl, by removing the need to look at the
TypedefDecl while constructing the TypedefType.

This fixes all the currently-known failures for PR48434, but it's not a
complete fix, because we can still trigger deserialization cycles, which
are not supposed to happen.
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/Type.h
clang/include/clang/AST/TypeProperties.td
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Type.cpp
clang/test/PCH/cxx-templates.cpp
clang/test/PCH/cxx-templates.h