bruno added a comment.

Hi Volodymyr, thanks for improving this.

> Need to double check what tests we have when using relative path names at the 
> root level.

Another interesting place to look at is 
`unittests/Basic/VirtualFileSystemTest.cpp`

> I'd like to make the behavior consistent because a file name is a specific 
> case of relative paths. So far there are no assertions and no errors but file 
> lookup doesn't seem to be working.

Makes sense. My general impression is that relative paths don't make sense here 
either, but you can address that in a follow up patch (giving time for any 
potential counterexample on this).



================
Comment at: clang/lib/Basic/VirtualFileSystem.cpp:1416
+        if (NameValueNode)
+          error(NameValueNode, "file is not located in any directory");
+        return nullptr;
----------------
vsapsai wrote:
> Not happy with the error message but didn't come up with anything better. 
> Suggestions are welcome.
What about the message you used in the comment: `file entry is at the root 
level, outside of any directory` ?


https://reviews.llvm.org/D49518



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to