Page MenuHomePhabricator

Regression test to ensure that we handling importing of anonymous enums correctly
ClosedPublic

Authored by shafik on Mar 21 2019, 2:09 PM.

Details

Summary

https://reviews.llvm.org/D51633 added error handling in the ASTImporter.cpp which uncovered an underlying bug in which we used the wrong name when handling naming conflicts. This could cause a segmentation fault when attempting to cast an int to an enum during expression parsing.

This test should pass once https://reviews.llvm.org/D59665 is committed.

Diff Detail

Repository
rL LLVM

Event Timeline

shafik created this revision.Mar 21 2019, 2:09 PM
davide accepted this revision.Mar 21 2019, 2:17 PM
davide added a subscriber: davide.

LGTM, just clang format main.cpp before committing.

This revision is now accepted and ready to land.Mar 21 2019, 2:17 PM
aprantl added inline comments.Mar 22 2019, 8:36 AM
packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp
1 ↗(On Diff #191778)

You can speed up compilation time of this test significantly by removing the printf and the include of cstdio.

8 ↗(On Diff #191778)

It looks like this variable is not actually used by the test?

shafik updated this revision to Diff 195254.Apr 15 2019, 3:02 PM
shafik marked 3 inline comments as done.

Small updated to test, remove use of printf and associated include.

packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp
8 ↗(On Diff #191778)

I need the type in the test, so this forces the debug information to be generated.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2019, 4:03 PM