[Lldb-commits] [PATCH] D49415: Add unit tests for VMRange

Leonard Mosescu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 3 17:51:05 PDT 2018


lemo added subscribers: teemperor, lemo.
lemo added a comment.

The new test cases did catch a real bug:

[ RUN      ] VMRange.CollectionContains
llvm/src/tools/lldb/unittests/Utility/VMRangeTest.cpp:146: Failure
Value of: VMRange::ContainsRange(collection, VMRange(0x100, 0x104))

  Actual: false

Expected: true

class RangeInRangeUnaryPredicate {
public:
RangeInRangeUnaryPredicate(VMRange range) : _range(range) {} // note that
_range binds to a temporary!
bool operator()(const VMRange &range) const {
return range.Contains(_range);
}
const VMRange &_range;
};

I just sent out a review for the fix (https://reviews.llvm.org/D50290)


Repository:
  rL LLVM

https://reviews.llvm.org/D49415





More information about the lldb-commits mailing list