summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/PointerIntPairTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* Fix PointerIntPair so that it can use an enum class as its integer template ↵Michael Gottesman2016-01-131-0/+27
| | | | | | | | | | | | | | | | | | | | argument. Summary: The problem here is that an enum class can not be implicitly converted to an integer. That assumption snuck back into PointerIntPair. This commit fixes the issue and more importantly adds some unittests to make sure that we do not break this again. rdar://23594806 Reviewers: gribozavr Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16131 llvm-svn: 257574
* [ADT] Use a nonce type with at least 4 byte alignment.Chandler Carruth2015-12-291-0/+1
| | | | | | | | | We didn't actually statically check this, and so it worked 25% of the time for me. =/ Really sorry it took so long to fix, I shouldn't leave the commit log editor window open without saving and landing the commit. =[ llvm-svn: 256528
* [ADT] Don't use a fixture just to get a nonce type for this unittest.Chandler Carruth2015-12-281-12/+12
| | | | | | | Instead, actually produce a nonce type in the test and use that. This makes the test, IMO, both simpler and more clear. llvm-svn: 256518
* ADT/PointerIntPairTest.cpp: Prune obsolete #if. We don't support msc17 anymore.NAKAMURA Takumi2015-02-171-2/+0
| | | | llvm-svn: 229501
* ADT/PointerIntPairTest.cpp: Appease msc17.NAKAMURA Takumi2014-03-101-1/+3
| | | | | | | - Use constructor instead of initializer list. - Disable ManyUnusedBits for now. llvm-svn: 203436
* Fix EXPECT_* to not produce a compile warning.Eli Bendersky2014-03-071-2/+2
| | | | | | EXPECT_TRUE/FALSE is also more idiomatic for booleans than EXPECT_EQ llvm-svn: 203284
* [ADT] Update PointerIntPair to handle pointer types with more than 31 bits free.Jordan Rose2014-03-071-0/+74
Previously, the assertions in PointerIntPair would try to calculate the value (1 << NumLowBitsAvailable); the inferred type here is 'int', so if there were more than 31 bits available we'd get a shift overflow. Also, add a rudimentary unit test file for PointerIntPair. llvm-svn: 203273
OpenPOWER on IntegriCloud