]> granicus.if.org Git - clang/commit
As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
authorAnders Carlsson <andersca@mac.com>
Sun, 10 Apr 2011 20:33:22 +0000 (20:33 +0000)
committerAnders Carlsson <andersca@mac.com>
Sun, 10 Apr 2011 20:33:22 +0000 (20:33 +0000)
commit7d99bc37e77157523e3bfbc6c077842b74e6690f
treef7abc6739dafe6154c2cf073e8dc3fd39306bf24
parentfb8721ce4c6fef3739b1cbd1e38e3f1949462033
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<C*>(b);
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
include/clang/AST/OperationKinds.h
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Sema/SemaCXXCast.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp