Page MenuHomePhabricator

Fix expression evaluation for resolving anonymous aggregrate types with a typedefed name
ClosedPublic

Authored by ldrumm on Mar 11 2016, 2:01 PM.

Details

Summary

This fixes a recently reported a bug relating to the clang expression evaluator no longer being able to resolve calls to
functions with arguments to typedefed anonymous structs, unions, or enums after a cleanup to the expression parsing code in r260768

This fixes the issue by attaching the tagged name to the original clang::TagDecl object when generating the typedef in lldb::ClangAstContext::CreateTypeDef.

This also fixes the issue for anonymous typedefs for non-struct types (unions and enums) where we have a tag name.

Diff Detail

Repository
rL LLVM

Event Timeline

ldrumm updated this revision to Diff 50473.Mar 11 2016, 2:01 PM
ldrumm retitled this revision from to Fix expression evaluation for resolving anonymous aggregrate types with a typedefed name.
ldrumm updated this object.
ldrumm added reviewers: clayborg, spyffe.
spyffe requested changes to this revision.Mar 11 2016, 2:04 PM
spyffe edited edge metadata.

Wow, I did not know that function existed, good hunting! Could you add a testcase to make sure this doesn't regress?

This revision now requires changes to proceed.Mar 11 2016, 2:04 PM

Hi Sean
I added a regression test in this diff

I can combine them if you like, but I thought I'd add the test first.

Best

Luke

spyffe added a subscriber: spyffe.Mar 11 2016, 2:35 PM

Whoops, thanks for letting me know.
I’ll approve both.

Sean

spyffe accepted this revision.Mar 11 2016, 2:39 PM
spyffe edited edge metadata.

In that case, this is fine.

This revision is now accepted and ready to land.Mar 11 2016, 2:39 PM
clayborg accepted this revision.Mar 11 2016, 5:13 PM
clayborg edited edge metadata.

Looks good, great find!

This revision was automatically updated to reflect the committed changes.