summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/SparseBitVectorTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [unittests] ADT: silence -Wself-assign diagnosticsRoman Lebedev2018-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D44883 extends -Wself-assign to also work on C++ classes. In it's current state (as suggested by @rjmccall), it is not under it's own sub-group. Since that diag is enabled by `-Wall`, stage2 testing showed that: * It does not fire on any llvm code * It does fire for these 3 unittests * It does fire for libc++ tests This diff simply silences those new warnings in llvm's unittests. A similar diff will be needed for libcxx. (`libcxx/test/std/language.support/support.types/byteops/`, maybe something else) Since i don't think we want to repeat rL322901, let's talk about it. I've subscribed everyone who i think might be interested... There are several ways forward: * Not extend -Wself-assign, close D44883. Not very productive outcome i'd say. * Keep D44883 in it's current state. Unless your custom overloaded operators do something unusual for when self-assigning, the warning is no less of a false-positive than the current -Wself-assign. Except for tests of course, there you'd want to silence it. The current suggestion is: ``` S a; a = (S &)a; ``` * Split the diagnostic in two - `-Wself-assign-builtin` (i.e. what is `-Wself-assign` in trunk), and `-Wself-assign-overloaded` - the new part in D44883. Since, as i said, i'm not really sure why it would be less of a error than the current `-Wself-assign`, both would still be in `-Wall`. That way one could simply pass `-Wno-self-assign-overloaded` for all the tests. Pretty simple to do, and will surely work. * Split the diagnostic in two - `-Wself-assign-trivial`, and `-Wself-assign-nontrivial`. The choice of which diag to emit would depend on trivial-ness of that particular operator. The current `-Wself-assign` would be `-Wself-assign-trivial`. https://godbolt.org/g/gwDASe - `A`, `B` and `C` case would be treated as trivial, and `D`, `E` and `F` as non-trivial. Will be the most complicated to implement. Thoughts? Reviewers: aaron.ballman, rsmith, rtrieu, rjmccall, dblaikie, atrick, gottesmm Reviewed By: dblaikie Subscribers: lebedev.ri, phosek, vsk, rnk, thakis, sammccall, mclow.lists, llvm-commits, rjmccall Differential Revision: https://reviews.llvm.org/D45082 llvm-svn: 329491
* [ADT] Add SparseBitVector::find_last().Zachary Turner2017-01-171-0/+39
| | | | | | Differential Revision: https://reviews.llvm.org/D28817 llvm-svn: 292288
* Miscellaneous Fixes for SparseBitVectorDaniel Berlin2015-07-201-0/+94
| | | | | | | | | | | | | | | | | Summary: 1. Fix return value in `SparseBitVector::operator&=`. 2. Add checks if SBV is being assigned is invoking SBV. Reviewers: dberlin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11342 Committed on behalf of sl@ llvm-svn: 242693
* Add a missing ilist_node.h #include to SparseBitVector, and add a very shortJeffrey Yasskin2009-07-251-0/+36
test for it. The test is by no means complete, but it tests the problem I was fixing. llvm-svn: 77025
OpenPOWER on IntegriCloud