[cfe-commits] r129256 - in /cfe/trunk: 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.
Anders Carlsson
andersca at mac.com
Sun Apr 10 18:09:59 PDT 2011
On Apr 10, 2011, at 6:09 PM, Eli Friedman wrote:
> On Sun, Apr 10, 2011 at 1:33 PM, Anders Carlsson <andersca at mac.com> wrote:
>> Author: andersca
>> Date: Sun Apr 10 15:33:22 2011
>> New Revision: 129256
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=129256&view=rev
>> Log:
>> 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);
>> }
>
> Adding an extra cast kind seems to complicate things for what should
> be a very rare case.
Yeah, after talking to John we decided on a better approach. Stay tuned!
- Anders
More information about the cfe-commits
mailing list