================
@@ -128,6 +128,15 @@ static void addLocAccess(MemoryEffects &ME, const 
MemoryLocation &Loc,
     ME |= MemoryEffects::argMemOnly(MR);
     return;
   }
+  // TODO: This should be refined to use upcoming Loc.TBAAErrno for errno
+  // memory, rather than manually inspecting the underlying object.
+  if (isa<CallInst>(UO)) {
+    auto *Callee = cast<CallInst>(UO)->getCalledFunction();
+    if (Callee && Callee->getName() == "__errno_location") {
----------------
antoniofrighetto wrote:

Right, clang on Windows links against UCRT, which declares _errno. This has to 
be taken into account. 

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

Reply via email to