diff options
author | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-10-04 17:11:33 +1000 |
---|---|---|
committer | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-10-04 17:11:33 +1000 |
commit | 684045e9e843ed9b8be30728482ce3d69d63b527 (patch) | |
tree | 0707aa71b902384766a7c0eb4d901fac9a5cbb63 /clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp | |
parent | f168645671e31b5d2e7fb134b9d9f8750aebb872 (diff) |
Lets keep trying with this here equation system.
Still not there, but more non-functional code is there.
Splitting blocks into sub-blocks now works, as does some of the guard stuff and
the general "shape" of the resulting equation system.
Diffstat (limited to 'clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp')
-rw-r--r-- | clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp b/clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp index b67591f..08c66ff 100644 --- a/clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp +++ b/clang/include/clang/Analysis/Analyses/IntervalSolver/Operator.hpp @@ -28,6 +28,11 @@ struct Maximum : public Operator<Domain> { } }; + +template<class T> +T minimum(const T& l, const T& r) { + return (l < r ? l : r); +} template<typename Domain> struct Minimum : public Operator<Domain> { virtual Domain eval(const std::vector<Domain>& arguments) const { @@ -35,7 +40,7 @@ struct Minimum : public Operator<Domain> { for (typename std::vector<Domain>::const_iterator it = arguments.begin(); it != arguments.end(); ++it) { - result = (*it < result ? *it : result); + result = minimum(*it, result); //*it < result ? *it : result); } return result; } |