summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/Casting.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort the #include lines for unittest/...Chandler Carruth2012-12-041-1/+0
| | | | llvm-svn: 169250
* Casting.h: Automatically handle isa<Base>(Derived).Sean Silva2012-10-111-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, all such cases are handled with no dynamic check. All `classof()` of the form class Foo { [...] static bool classof(const Bar *) { return true; } [...] } where Foo is an ancestor of Bar are no longer necessary. Don't write them! Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so that Foo is considered an ancestor of itself. This leads to the following rule of thumb for LLVM-style RTTI: The argument type of `classof()` should be a strict ancestor. For more information about implementing LLVM-style RTTI, see docs/HowToSetUpLLVMStyleRTTI.rst llvm-svn: 165765
* Don't pass a null pointer to cast<> in its unit tests.Richard Smith2012-08-211-3/+5
| | | | llvm-svn: 162310
* unittests/Support/Casting.cpp: [PR8226] Workaround for MSVC|Debug.NAKAMURA Takumi2012-01-221-3/+2
| | | | llvm-svn: 148659
* add dyn_cast_or_null tests, exclude invalid dyn_cast testGabor Greif2010-07-221-8/+25
| | | | llvm-svn: 109111
* tidy upGabor Greif2010-07-221-13/+9
| | | | llvm-svn: 109110
* add dyn_cast tests and beef up others a bitGabor Greif2010-07-221-5/+34
| | | | llvm-svn: 109109
* tidy upGabor Greif2010-07-201-5/+3
| | | | llvm-svn: 108889
* migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into ↵Gabor Greif2010-07-201-7/+55
| | | | | | this file llvm-svn: 108864
* extend to cast<> and cast_or_null<> testsGabor Greif2010-07-201-3/+31
| | | | llvm-svn: 108854
* isa<> testsGabor Greif2010-07-201-1/+7
| | | | llvm-svn: 108851
* initial checkin for unittest to exercise Support/Casting.hGabor Greif2010-07-201-0/+32
this is still minimal on purpose, but I plan to migrate the ugly hack under #ifdef DEBUG_CAST_OPERATORS into this file llvm-svn: 108849
OpenPOWER on IntegriCloud