aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCXXCast.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-04-11 02:03:26 +0000
committerAnders Carlsson <andersca@mac.com>2011-04-11 02:03:26 +0000
commit575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 (patch)
tree18d07d74d7989eb83d46a9be809720278985b07c /lib/Sema/SemaCXXCast.cpp
parent3ddcdd5d6c88902d24baa9e6bb240a3da88e68d4 (diff)
Remove CK_DynamicToNull.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXCast.cpp')
-rw-r--r--lib/Sema/SemaCXXCast.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp
index 52a13ef5b2..31a772a5d8 100644
--- a/lib/Sema/SemaCXXCast.cpp
+++ b/lib/Sema/SemaCXXCast.cpp
@@ -522,14 +522,6 @@ CheckDynamicCast(Sema &Self, ExprResult &SrcExpr, QualType DestType,
return;
}
- // If the source class is marked 'final', and the destination class does not
- // derive from the source class, then we know that the result is always null.
- if (SrcRecord->getDecl()->hasAttr<FinalAttr>() &&
- !Self.IsDerivedFrom(DestPointee, SrcPointee)) {
- Kind = CK_DynamicToNull;
- return;
- }
-
// C++ 5.2.7p5
// Upcasts are resolved statically.
if (DestRecord && Self.IsDerivedFrom(SrcPointee, DestPointee)) {