llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Chen Miao (ChenMiaoi)

<details>
<summary>Changes</summary>

Commit https://github.com/llvm/llvm-project/commit/8d323d150610 changed the 
framework directory lookup to update `Dir` only on success, preserving its 
non-empty value on failure. Remove the redundant assertion and the outdated 
FIXME about directory removal causing it to fail.

---
Full diff: https://github.com/llvm/llvm-project/pull/242800.diff


1 Files Affected:

- (modified) clang/lib/Lex/HeaderSearch.cpp (-3) 


``````````diff
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 235dc1aad38be9..d8219f626e3674 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -2126,9 +2126,6 @@ HeaderSearch::getModuleMapHomeDir(FileEntryRef File,
       if (DirName.ends_with(".framework"))
         if (auto MaybeDir = FileMgr.getOptionalDirectoryRef(DirName))
           Dir = *MaybeDir;
-      // FIXME: This assert can fail if there's a race between the above check
-      // and the removal of the directory.
-      assert(Dir && "parent must exist");
     }
   }
   return Dir;

``````````

</details>


https://github.com/llvm/llvm-project/pull/242800
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to