================ @@ -105,6 +106,27 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::Value emitAlloca(llvm::StringRef name, mlir::Type ty, mlir::Location loc, clang::CharUnits alignment); +private: + // Track current variable initialization (if there's one) + const clang::VarDecl *currVarDecl = nullptr; + class VarDeclContext { + CIRGenFunction &p; + const clang::VarDecl *oldVal = nullptr; + + public: + VarDeclContext(CIRGenFunction &p, const VarDecl *value) : p(p) { + if (p.currVarDecl) ---------------- andykaylor wrote:
You're right. I can see no reason this condition needs to be here. https://github.com/llvm/llvm-project/pull/130164 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits