aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/PointerIntPairTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-01-13Fix PointerIntPair so that it can use an enum class as its integer template ↵Michael Gottesman1-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
2015-12-29[ADT] Use a nonce type with at least 4 byte alignment.Chandler Carruth1-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
2015-12-28[ADT] Don't use a fixture just to get a nonce type for this unittest.Chandler Carruth1-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
2015-02-17ADT/PointerIntPairTest.cpp: Prune obsolete #if. We don't support msc17 anymore.NAKAMURA Takumi1-2/+0
llvm-svn: 229501
2014-03-10ADT/PointerIntPairTest.cpp: Appease msc17.NAKAMURA Takumi1-1/+3
- Use constructor instead of initializer list. - Disable ManyUnusedBits for now. llvm-svn: 203436
2014-03-07Fix EXPECT_* to not produce a compile warning.Eli Bendersky1-2/+2
EXPECT_TRUE/FALSE is also more idiomatic for booleans than EXPECT_EQ llvm-svn: 203284
2014-03-07[ADT] Update PointerIntPair to handle pointer types with more than 31 bits free.Jordan Rose1-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