This is an archive of the discontinued LLVM Phabricator instance.

[CrossTU] Test change only: improve ctu-main.c
AbandonedPublic

Authored by balazske on Jul 12 2019, 3:55 AM.

Details

Reviewers
martong
Summary

New lines are added to test ctu-main.c to make code execute when a
function with invalid source range is encountered on bug path
with NoStoreFuncVisitor.

Diff Detail

Event Timeline

balazske created this revision.Jul 12 2019, 3:55 AM
martong accepted this revision.Jul 12 2019, 8:42 AM
This revision is now accepted and ready to land.Jul 12 2019, 8:42 AM

Hmmm, did this result in an assertion?

The problem is already corrected in clang9 but maybe not in clang8. Something similar is fixed in https://reviews.llvm.org/rC357329.

The mentioned commit has a test that reproduces the same problem, so this revision is not needed (abandon it?).

The mentioned commit has a test that reproduces the same problem, so this revision is not needed (abandon it?).

I think we should have this change, because it tests also if we can import the "extern implicit" function properly. Plus the bug visitor is exercised when the AST is merged.
So, even if the mentioned commit has a similar test I think with these changes we can achieve higher coverage and can prevent CTU related regression.

I do not know how the AST import is relevant in this case, the 'implicit' function is not imported here. The test does something similar as the mentioned one, only the reported problem is after the imported function.

balazske abandoned this revision.Jul 24 2019, 5:39 AM