[PATCH] D58213: [FileManager] fillRealPathName even if we aren't opening the file

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 14 12:47:32 PST 2019


jkorous marked 2 inline comments as done.
jkorous added a comment.

Thanks for taking a look!



================
Comment at: lib/Basic/FileManager.cpp:214
 
     return nullptr;
   }
----------------
If we can't stat the file we return here.


================
Comment at: lib/Basic/FileManager.cpp:271
+  } else if (!openFile) {
+    // Since we didn't return early after getStatValue() call the file exists.
+    fillRealPathName(&UFE, InterndFileName);
----------------
arphaman wrote:
> I don't really understand what this comment is trying to say. Can you rephrase it?
Please see the above comment (line 214).

What I meant is that it's guaranteed that the file exists as we would have returned otherwise. Does that make sense?

Any suggestion how to rephrase the comment? (Or shall I just remove it?)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58213/new/

https://reviews.llvm.org/D58213





More information about the cfe-commits mailing list