summaryrefslogtreecommitdiff
path: root/unittests/Support/Casting.cpp
Commit message (Collapse)AuthorAge
* Sort the #include lines for unittest/...Chandler Carruth2012-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169250 91177308-0d34-0410-b5e6-96231b3b80d8
* Casting.h: Automatically handle isa<Base>(Derived).Sean Silva2012-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165765 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass a null pointer to cast<> in its unit tests.Richard Smith2012-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162310 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Casting.cpp: [PR8226] Workaround for MSVC|Debug.NAKAMURA Takumi2012-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148659 91177308-0d34-0410-b5e6-96231b3b80d8
* add dyn_cast_or_null tests, exclude invalid dyn_cast testGabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109111 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upGabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109110 91177308-0d34-0410-b5e6-96231b3b80d8
* add dyn_cast tests and beef up others a bitGabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109109 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upGabor Greif2010-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108889 91177308-0d34-0410-b5e6-96231b3b80d8
* migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into ↵Gabor Greif2010-07-20
| | | | | | this file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108864 91177308-0d34-0410-b5e6-96231b3b80d8
* extend to cast<> and cast_or_null<> testsGabor Greif2010-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108854 91177308-0d34-0410-b5e6-96231b3b80d8
* isa<> testsGabor Greif2010-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108851 91177308-0d34-0410-b5e6-96231b3b80d8
* initial checkin for unittest to exercise Support/Casting.hGabor Greif2010-07-20
this is still minimal on purpose, but I plan to migrate the ugly hack under #ifdef DEBUG_CAST_OPERATORS into this file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108849 91177308-0d34-0410-b5e6-96231b3b80d8