From c602006638a659b950be676f76aa95eddbbedfb3 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 10 Apr 2011 20:33:22 +0000 Subject: As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which represents a dynamic cast where we know that the result is always null. For example: struct A { virtual ~A(); }; struct B final : A { }; struct C { }; bool f(B* b) { return dynamic_cast(b); } llvm-svn: 129256 --- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 0a7f1e93af1..6a7637097b0 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -2178,6 +2178,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, // Various C++ casts that are not handled yet. case CK_ResolveUnknownAnyType: case CK_Dynamic: + case CK_DynamicToNull: case CK_ToUnion: case CK_BaseToDerived: case CK_NullToMemberPointer: -- cgit v1.2.3