History log of /external/llvm/unittests/Support/Casting.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/unittests/Support/Casting.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/unittests/Support/Casting.cpp
60f18ad8a5fa7d5b008a1fecf9a79b68883ca192 18-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix a regression I introduced back in r178147.

We don't want cast and dyn_cast to work on temporaries. They don't extend
lifetime like a direct bind to a reference would, so they can introduce
hard to find bugs.

I added tests to make sure we don't regress this. Thanks to Eli Friedman for
noticing this and for his suggestions on how to test it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
5a88dda4be791426ab4d20a6a6c9c65d66614a27 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for unittest/...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
8b8fa7b2f403ae2f342413239c4151e075022c97 12-Oct-2012 Sean Silva <silvas@purdue.edu> Casting.h: Automatically handle isa<Base>(Derived).

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
/external/llvm/unittests/Support/Casting.cpp
79b59a2766c42180f08fd49c3ea1c5b66682d487 21-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't pass a null pointer to cast<> in its unit tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
2a53577728948052b8508760406b6ba68e55fc82 22-Jan-2012 NAKAMURA Takumi <geek4civic@gmail.com> unittests/Support/Casting.cpp: [PR8226] Workaround for MSVC|Debug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
f06eb3719aef56a31fb5c56e5b086995aefafef5 22-Jul-2010 Gabor Greif <ggreif@gmail.com> add dyn_cast_or_null tests, exclude invalid dyn_cast test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
46a35015f5268bf72150eb1b1517337e245e38e5 22-Jul-2010 Gabor Greif <ggreif@gmail.com> tidy up

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
d159467ad66b21172d6d88a9f8e496c5b6c2ba4e 22-Jul-2010 Gabor Greif <ggreif@gmail.com> add dyn_cast tests and beef up others a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
b3c90d96bd64c4b2b1b471b3c45bb119c526ca7b 20-Jul-2010 Gabor Greif <ggreif@gmail.com> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
e8950977a5cf929ab15b6c5f7265a029500d9a7d 20-Jul-2010 Gabor Greif <ggreif@gmail.com> migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into this file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
08993c03abed359171d12b50ab38da0ac331cfb7 20-Jul-2010 Gabor Greif <ggreif@gmail.com> extend to cast<> and cast_or_null<> tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
af8e2ef649b90e88f9d595a638279e3bc4892845 20-Jul-2010 Gabor Greif <ggreif@gmail.com> isa<> tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/Casting.cpp
ee57dae3d8bcb2f3f41eb225bc615045d13d9dda 20-Jul-2010 Gabor Greif <ggreif@gmail.com> initial checkin for unittest to exercise Support/Casting.h

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
/external/llvm/unittests/Support/Casting.cpp