[clang] [Clang][ExprConstant] fix constant expression did not evaluate to integer (PR #97146)

Zhikai Zeng via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 29 21:07:10 PDT 2024


Backl1ght wrote:

> I'm concerned that we're calling EvaluateKnownConstInt on an lvalue; that might indicate there's something wrong with the AST. Usually there should be an lvalue-to-rvalue cast somewhere.

@efriedma-quic lvalue-to-rvalue cast is done here at https://github.com/llvm/llvm-project/blob/aec7670b5d6354b63b011c9ed0632b70983b0328/clang/lib/AST/ExprConstant.cpp#L15829-L15835

https://github.com/llvm/llvm-project/pull/97146


More information about the cfe-commits mailing list