ahatanak wrote:

`hasInit` checks whether `VarDecl::Init`'s pointer is null. But 
`VarDecl::ensureEvaluatedStmt` creates an `EvaluatedStmt` if there isn't one 
already,  after which `hasInit` returns true.

https://github.com/llvm/llvm-project/blob/3af717d661e9fe8d562181b933a373ca58e41b27/clang/lib/AST/Decl.cpp#L2541

`Init.get<Stmt *>()` returns null when there's no initializer.

https://github.com/llvm/llvm-project/pull/93749
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to