This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Templatefy SMTConstraintManager so more generic code can be moved from solver specific implementations. NFC.
ClosedPublic

Authored by mikhail.ramalho on Aug 15 2018, 5:17 AM.

Details

Summary

By making SMTConstraintManager a template and passing the SMT constraint type and expr, we can further move code from the Z3ConstraintManager class to the generic SMT constraint Manager.

Now, each SMT specific constraint manager only needs to implement the method bool canReasonAbout(SVal X) const.

Diff Detail

Repository
rL LLVM

Event Timeline

mikhail.ramalho retitled this revision from [analyzer] Templatefy SMTConstraintManager so more generic code can be moved from solver specific implementations to [analyzer] Templatefy SMTConstraintManager so more generic code can be moved from solver specific implementations. NFC..

The trouble with templates is that you have to move code to the header, which then requires recompilation of all transitive includes on every single change...
But then I don't suppose we would be touching that header often.

This revision is now accepted and ready to land.Aug 21 2018, 11:02 AM
This revision was automatically updated to reflect the committed changes.
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h