This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix conversion from LocAsInteger to Loc symbol.
ClosedPublic

Authored by NoQ on Sep 28 2018, 11:46 AM.

Details

Summary

The thing i promised to fix in the last bullet of D44347:

SymbolReaper::markElementIndicesLive() scans an array symbol, which is always a NonLoc. However, it may still be a nonloc::LocAsInteger, and in this case descend to the symbolic base would be necessary, as demonstrated by test_loc_as_integer_element_index_lifetime(). This test, however, is not fixed by the current patch, due to getAsLocSymbol() incorrectly failing to pass its IncludeBaseRegions argument into the recursive call. But i decided not to investigate it further today, because, well, enough is enough.

Diff Detail

Repository
rC Clang

Event Timeline

NoQ created this revision.Sep 28 2018, 11:46 AM
This revision is now accepted and ready to land.Sep 28 2018, 11:48 AM
This revision was automatically updated to reflect the committed changes.