[clang] [Thread Safety Analysis] Fix a bug of context saving in alias-analysis (PR #178825)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 30 11:49:37 PST 2026


================
@@ -726,11 +726,10 @@ void VarMapBuilder::VisitCallExpr(const CallExpr *CE) {
       }
     }
 
-    if (VDec && Ctx.lookup(VDec)) {
+    if (VDec)
       Ctx = VMap->clearDefinition(VDec, Ctx);
-      VMap->saveContext(CE, Ctx);
-    }
   }
+  VMap->saveContext(CE, Ctx);
----------------
melver wrote:

Maybe quick comment stating why this is here.

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


More information about the cfe-commits mailing list