diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-08-21 17:32:13 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-08-21 17:32:13 -0700 |
commit | 66f271497ed92ebb05c66f54616e512606a2e314 (patch) | |
tree | 96d54cd64804ab7c9f2f52f680c3301aa789ce1d /unittests/Support/Casting.cpp | |
parent | b62e9abf7dd9e39c95327914ce9dfe216386824a (diff) | |
parent | bc363931085587bac42a40653962a3e5acd1ffce (diff) |
Merge up to r162331, git commit bc363931085587bac42a40653962a3e5acd1ffce
Diffstat (limited to 'unittests/Support/Casting.cpp')
-rw-r--r-- | unittests/Support/Casting.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unittests/Support/Casting.cpp b/unittests/Support/Casting.cpp index ca0b40b1f5..dc0205f325 100644 --- a/unittests/Support/Casting.cpp +++ b/unittests/Support/Casting.cpp @@ -95,8 +95,9 @@ TEST(CastingTest, cast) { EXPECT_NE(&F5, null_foo); const foo *F6 = cast<foo>(B4); EXPECT_NE(F6, null_foo); - foo *F7 = cast<foo>(fub()); - EXPECT_EQ(F7, null_foo); + // Can't pass null pointer to cast<>. + // foo *F7 = cast<foo>(fub()); + // EXPECT_EQ(F7, null_foo); foo *F8 = B1.baz(); EXPECT_NE(F8, null_foo); } @@ -121,7 +122,8 @@ TEST(CastingTest, dyn_cast) { EXPECT_NE(F2, null_foo); const foo *F3 = dyn_cast<foo>(B4); EXPECT_NE(F3, null_foo); - // foo *F4 = dyn_cast<foo>(fub()); // not permittible + // Can't pass null pointer to dyn_cast<>. + // foo *F4 = dyn_cast<foo>(fub()); // EXPECT_EQ(F4, null_foo); foo *F5 = B1.daz(); EXPECT_NE(F5, null_foo); |