[ASTImporter] Add Visitor for TypedefNameDecl's
authorVince Bridgers <vince.a.bridgers@gmail.com>
Thu, 16 Jul 2020 22:46:48 +0000 (17:46 -0500)
committereinvbri <vince.a.bridgers@ericsson.com>
Tue, 28 Jul 2020 16:52:29 +0000 (11:52 -0500)
commitf761acfb1a737d8a631a5e55b58cdb7c2215baad
tree365e303db426df68d77ea073980641c4f92d44e9
parent12f27fc4b505da848a06b37488c5717bf9e3b85d
[ASTImporter] Add Visitor for TypedefNameDecl's

We found a case where Typedef Name Declarations were not being added
correctly when importing builtin types. This exposed the need for a
TypedefNameDecl visitor so these types can be added by RecordDecl and
fields.

This code is covered by the ASTImporterTest cases that use the implicit
struct __NSConstantString_tag definitions.

Thanks to @martong for the debugging assist!

Depends on D83970.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D83992
clang/lib/AST/ASTImporterLookupTable.cpp
clang/test/Analysis/Inputs/ctu-import.c [new file with mode: 0644]
clang/test/Analysis/Inputs/ctu-import.c.externalDefMap.ast-dump.txt [new file with mode: 0644]
clang/test/Analysis/ctu-implicit.c [new file with mode: 0644]