Skip to content
Commit 986cbd80 authored by Takuya Shimizu's avatar Takuya Shimizu
Browse files

[clang][AST] TextNodeDumper should not evaluate the initializer of constexpr...

[clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable declaration when it has a dependent type

`TextNodeDumper` enabed through `-ast-dump` flag should not evlauate the initializer when it visits a constexpr `VarDecl` node if it has a dependent type.

I found a crashing case fixed by this change and added it as a test case.
`template <typename T> constexpr T call_init(0);`
Link: https://godbolt.org/z/3bG9Pjj5E

This is a fix for the regression caused by D146358

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