Page MenuHomePhabricator

[analyzer] Assume that we always have a SubEngine available
ClosedPublic

Authored by xazax.hun on Dec 14 2018, 2:01 AM.

Details

Summary

I was stumbled upon some checks whether a SubEngine is available. I was wondering why do we have those checks so I removed them and wondered if the tests would break. They did not break on my machine, so I submitted this patch.

Do yo think these should be removed? If no, how could we test those code paths because apparently they are untested at the moment.

Diff Detail

Repository
rC Clang

Event Timeline

xazax.hun created this revision.Dec 14 2018, 2:01 AM

We could also add an assert to getOwningEngine I guess.

NoQ accepted this revision.Dec 14 2018, 2:24 PM

Yup, squash these! Even if there was a plan to use ProgramState separately for some other sort of analysis that doesn't involve a sub-engine, it is currently long forgotten.

This revision is now accepted and ready to land.Dec 14 2018, 2:24 PM
NoQ added a comment.Dec 14 2018, 2:25 PM

We could also add an assert to getOwningEngine I guess.

Or make it return a reference, like everything else.

This revision was automatically updated to reflect the committed changes.