Skip to content
Commit d1199808 authored by Nick Desaulniers's avatar Nick Desaulniers
Browse files

[clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

Consider the following statement:
    const char* foo = "foo";

For the sub-AST:
    `-ImplicitCastExpr <col:19> 'const char *' <NoOp>
      `-ImplicitCastExpr <col:19> 'char *' <ArrayToPointerDecay>
        `-StringLiteral <col:19> 'char[4]' lvalue "foo"

The address of the StringLiteral can be emitted as the Constant.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D156185
parent e1bdf321
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment