diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-07 14:42:25 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-07 14:42:25 +0000 |
commit | c1dafe8dc3cd9851e22585c0137d39843b62b9fa (patch) | |
tree | 10203c5ffcf6d468e854f595ef39382b4a094e45 /unittests/Support | |
parent | 122a970111b8ec66ae330f2c218ae951dddaf75b (diff) | |
download | llvm-c1dafe8dc3cd9851e22585c0137d39843b62b9fa.tar.gz llvm-c1dafe8dc3cd9851e22585c0137d39843b62b9fa.tar.bz2 llvm-c1dafe8dc3cd9851e22585c0137d39843b62b9fa.tar.xz |
[C++11] Replace LLVM-style type traits with C++11 standard ones.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support')
-rw-r--r-- | unittests/Support/Casting.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unittests/Support/Casting.cpp b/unittests/Support/Casting.cpp index 0445178895..228c90bb8b 100644 --- a/unittests/Support/Casting.cpp +++ b/unittests/Support/Casting.cpp @@ -77,12 +77,16 @@ using namespace llvm; // Test the peculiar behavior of Use in simplify_type. -int Check1[is_same<simplify_type<Use>::SimpleType, Value *>::value ? 1 : -1]; -int Check2[is_same<simplify_type<Use *>::SimpleType, Value *>::value ? 1 : -1]; +static_assert(std::is_same<simplify_type<Use>::SimpleType, Value *>::value, + "Use doesn't simplify correctly!"); +static_assert(std::is_same<simplify_type<Use *>::SimpleType, Value *>::value, + "Use doesn't simplify correctly!"); // Test that a regular class behaves as expected. -int Check3[is_same<simplify_type<foo>::SimpleType, int>::value ? 1 : -1]; -int Check4[is_same<simplify_type<foo *>::SimpleType, foo *>::value ? 1 : -1]; +static_assert(std::is_same<simplify_type<foo>::SimpleType, int>::value, + "Unexpected simplify_type result!"); +static_assert(std::is_same<simplify_type<foo *>::SimpleType, foo *>::value, + "Unexpected simplify_type result!"); namespace { |