summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_bvgraph.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-02-13 12:39:21 +0000
committerKostya Serebryany <kcc@google.com>2014-02-13 12:39:21 +0000
commitd0caa6e878b2cd55343aaff572a96453ae4d9a64 (patch)
tree55f51da52fcad34d71f056018f897e5eb9c9ec7b /lib/sanitizer_common/sanitizer_bvgraph.h
parent95e0ee58ffc6afc09f0a7a29b4a8fe02c74297bc (diff)
[sanitizer] address some of the dvyukov's comments on previous commits
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_bvgraph.h')
-rw-r--r--lib/sanitizer_common/sanitizer_bvgraph.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sanitizer_common/sanitizer_bvgraph.h b/lib/sanitizer_common/sanitizer_bvgraph.h
index 4ad43604b..958dd4d2a 100644
--- a/lib/sanitizer_common/sanitizer_bvgraph.h
+++ b/lib/sanitizer_common/sanitizer_bvgraph.h
@@ -34,12 +34,12 @@ class BVGraph {
// Returns true if a new edge was added.
bool addEdge(uptr from, uptr to) {
- check(from|to);
+ check(from, to);
return v[from].setBit(to);
}
bool hasEdge(uptr from, uptr to) const {
- check(from|to);
+ check(from, to);
return v[from].getBit(to);
}
@@ -78,7 +78,7 @@ class BVGraph {
}
private:
- void check(uptr idx) const { CHECK_LE(idx, size()); }
+ void check(uptr idx1, uptr idx2) const { CHECK_LE(idx1|idx2, size()); }
BV v[kSize];
};