Commit 2c26397f authored by Nick Desaulniers's avatar Nick Desaulniers
Browse files

[clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

Consider the following statement:
    void* foo = ((void *)0);

For the sub-AST:
    | `-ImplicitCastExpr 'const void *' <NullToPointer>
    |   `-CStyleCastExpr 'void *' <NullToPointer>
    |     `-IntegerLiteral 'int' 0

If the subexpression of the cast is itself the NULL constant, then
ImplicitCastExpr should emit the NULL pointer constant.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D156175
parent 4e1b55a7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment