diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-06-08 22:29:17 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-06-08 22:29:17 +0000 |
commit | 66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e (patch) | |
tree | b9db3c4a6ee223002b945659169ab39cdd9fd80d /llvm/unittests/Support/Casting.cpp | |
parent | 41181d140c99913f8c8d73791dd4babfcba8a73d (diff) | |
download | llvm-66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e.zip llvm-66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e.tar.gz llvm-66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e.tar.bz2 |
[C++11] Use 'nullptr'.
llvm-svn: 210442
Diffstat (limited to 'llvm/unittests/Support/Casting.cpp')
-rw-r--r-- | llvm/unittests/Support/Casting.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/Support/Casting.cpp b/llvm/unittests/Support/Casting.cpp index 228c90b..88c7d19 100644 --- a/llvm/unittests/Support/Casting.cpp +++ b/llvm/unittests/Support/Casting.cpp @@ -18,7 +18,7 @@ namespace llvm { // Used to test illegal cast. If a cast doesn't match any of the "real" ones, // it will match this one. struct IllegalCast; -template <typename T> IllegalCast *cast(...) { return 0; } +template <typename T> IllegalCast *cast(...) { return nullptr; } // set up two example classes // with conversion facility @@ -90,7 +90,7 @@ static_assert(std::is_same<simplify_type<foo *>::SimpleType, foo *>::value, namespace { -const foo *null_foo = NULL; +const foo *null_foo = nullptr; bar B; extern bar &B1; @@ -175,7 +175,7 @@ TEST(CastingTest, dyn_cast_or_null) { const bar *B2 = &B; } // anonymous namespace -bar *llvm::fub() { return 0; } +bar *llvm::fub() { return nullptr; } namespace { namespace inferred_upcasting { @@ -203,7 +203,7 @@ TEST(CastingTest, UpcastIsInferred) { Derived D; EXPECT_TRUE(isa<Base>(D)); Base *BP = dyn_cast<Base>(&D); - EXPECT_TRUE(BP != NULL); + EXPECT_TRUE(BP != nullptr); } |