================ @@ -78,7 +78,7 @@ static void BuildParentMap(MapTy& M, Stmt* S, // The right thing to do is to give the OpaqueValueExpr its syntactic // parent, then not reassign that when traversing the semantic expressions. OpaqueValueExpr *OVE = cast<OpaqueValueExpr>(S); - if (OVMode == OV_Transparent || !M[OVE->getSourceExpr()]) { + if (OVMode == OV_Transparent || !M.contains(OVE->getSourceExpr())) { M[OVE->getSourceExpr()] = S; ---------------- ssahasra wrote:
Fixed with try_emplace() to avoid the second lookup as well, which inserts when the key is already present. https://github.com/llvm/llvm-project/pull/121736 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits