[clang] Remove redundant assertion & fix ClearStatName error (PR #130667)

Ayush Pareek via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 12 02:10:23 PDT 2025


================
@@ -93,7 +93,7 @@ class CachedFileSystemEntry {
   getDirectiveTokens() const {
     assert(!isError() && "error");
     assert(!isDirectory() && "not a file");
-    assert(Contents && "contents not initialized");
+    // Since isError() and isDirectory() imply that Contents is nullptr, the last assertion is unnecessary
----------------
ayushpareek2003 wrote:

Got it, sir. i will ensure that my comments focus on the code itself rather than describing updates. I’ll keep them clear and concise in my future pull requests 

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


More information about the cfe-commits mailing list