This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast
AbandonedPublic

Authored by ASDenysPetrov on Feb 24 2021, 7:33 AM.

Details

Summary

Simplify and move functionality from evalIntegralCast to evalCast. Replace evalIntegralCast with evalCast.

This patch shall not change any behavior.

Diff Detail

Event Timeline

ASDenysPetrov created this revision.Feb 24 2021, 7:33 AM
ASDenysPetrov requested review of this revision.Feb 24 2021, 7:33 AM

A bit improved.

Please make sure that you specify the parent revision or the patch can be applied on top of the tree.
Your lines clearly not match the top of the tree state.
https://github.com/llvm/llvm-project/blob/13f4448ae7db1a477ec2d48776e46415a3401314/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h#L129-L131

I really want to help you by finding regressions and stuff. But these mistakes hinder me a lot in applying your patches.

@steakhal

Please make sure that you specify the parent revision or the patch can be applied on top of the tree.

Sorry, probably missed to add a parent revision. Done.

NoQ added a comment.Mar 3 2021, 3:55 PM

That's definitely an improvement for our API surface. I think this is good but like @steakhal said I recommend running on a large codebase looking for potential regressions because this code is (still) very much spaghetti and hard to reason about.

Rebased on main.

All reports and crashes are preserved at this point of the patch stack - with or without z3 crosscheck on multiple projects - even on llvm.

If @NoQ doesn't have any objections I'm ok with this change.

NoQ accepted this revision.Mar 9 2021, 2:07 PM

Ok then, let's try to land it! 🤞

This revision is now accepted and ready to land.Mar 9 2021, 2:07 PM
ASDenysPetrov added a comment.EditedMar 11 2021, 6:56 AM
In D97388#2615104, @NoQ wrote:

Ok then, let's try to land it! 🤞

Thanks for the approval. Before land this we should land the preparatory revision D97296. Please, take a look. It should be safe as well.

This comment was removed by ASDenysPetrov.
ASDenysPetrov updated this revision to Diff 348286.EditedMay 27 2021, 8:45 AM

Mistakenly erased with another patch. Restored. But anyway this revision should be abandoned as irrelevant any more. D103096 is a new revision which makes this patch deprecated.