diff options
| author | Anders Carlsson <andersca@mac.com> | 2011-04-10 20:33:22 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2011-04-10 20:33:22 +0000 |
| commit | c602006638a659b950be676f76aa95eddbbedfb3 (patch) | |
| tree | 58ca20b706dac16703011e9559a827f778b571d3 /clang/lib/CodeGen/CGExprConstant.cpp | |
| parent | 784ba65787175be823f2e04e097b4d5d326282a2 (diff) | |
| download | bcm5719-llvm-c602006638a659b950be676f76aa95eddbbedfb3.tar.gz bcm5719-llvm-c602006638a659b950be676f76aa95eddbbedfb3.zip | |
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);
}
llvm-svn: 129256
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 822a999b963..578a37f0fcf 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -552,6 +552,7 @@ public: case CK_GetObjCProperty: case CK_ToVoid: case CK_Dynamic: + case CK_DynamicToNull: case CK_ResolveUnknownAnyType: return 0; |

