This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Actually test ArrayInitLoopExpr in the array-init-loop-expr test.
ClosedPublic

Authored by teemperor on Aug 22 2018, 11:20 AM.

Details

Summary

The array-init-loop-expr test is currently not testing the importing of ArrayInitLoopExprs.

This is because we import the S struct into the test.cpp context
and only do a copy-assignment in test.cpp, so the actual ArrayInitLoopExpr we wanted to
import is generated by clang directly in the target context. This means we actually
never test the importing of ArrayInitLoopExpr with this test, which becomes obvious
when looking at the missing test coverage for the respective VisitArrayInitLoopExpr method.

This patch moves the copy-assignment of our struct to the S.cpp context, which means
that test.cpp now actually has to import the ArrayInitLoopExpr.

Diff Detail

Repository
rL LLVM

Event Timeline

teemperor created this revision.Aug 22 2018, 11:20 AM
a_sidorin accepted this revision.Aug 22 2018, 3:26 PM
a_sidorin added a subscriber: a_sidorin.

Wow, I totally overlooked this. Thank you!

This revision is now accepted and ready to land.Aug 22 2018, 3:26 PM
This revision was automatically updated to reflect the committed changes.