This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add typedefs to the DeclContext they are created in
ClosedPublic

Authored by labath on Aug 18 2020, 7:06 AM.

Details

Summary

TypeSystemClang::CreateTypedef was creating a typedef in the right
DeclContext, but it was not actually adding it as a child of the
context. The resulting inconsistent state meant that we would be unable
to reference the typedef from an expression directly, but we could use
them if they end up being pulled in by some previous subexpression
(because the ASTImporter will set up the correct links in the expression
ast).

This patch adds the typedef to the decl context it is created in.

Diff Detail