<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">Sorry, my bad, I was out on Friday.</div><div class=""><br class=""></div><div class="">Will re-land patch with fixed test shortly.</div><div class=""><br class=""></div><div class="">Jan<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 15, 2019, at 12:47 PM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Reverted:<div class=""><a href="http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/4351" class="">http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/4351</a></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 15, 2019 at 11:07 AM Galina Kistanova via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class="">Hello Jan,<br class=""><br class="">It looks like this commit broke tests on couple of win builders:</div><div dir="ltr" class=""><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/23655" target="_blank" class="">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/23655</a><br class=""><a href="http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win" target="_blank" class="">http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win</a><br class="">. . .<br class="">Failing Tests (1):<br class=""> Clang-Unit :: Basic/./BasicTests.exe/FileManagerTest.getFileDontOpenRealPath<br class=""><br class="">Please have a look ASAP?<br class=""><br class="">Thanks<br class=""><br class="">Galina<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 14, 2019 at 3:02 PM Jan Korous via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: jkorous<br class="">
Date: Thu Feb 14 15:02:35 2019<br class="">
New Revision: 354075<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=354075&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=354075&view=rev</a><br class="">
Log:<br class="">
[clang][FileManager] fillRealPathName even if we aren't opening the file<br class="">
<br class="">
The pathname wasn't previously filled when the getFile() method was called with openFile = false.<br class="">
We are caching FileEntry-s in ParsedAST::Includes in clangd and this caused the problem.<br class="">
<br class="">
This fixes an internal test failure in clangd - ClangdTests.GoToInclude.All<br class="">
<br class="">
<a href="rdar://47536127" class="">rdar://47536127</a><br class="">
<br class="">
Differential Revision: <a href="https://reviews.llvm.org/D58213" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D58213</a><br class="">
<br class="">
Modified:<br class="">
cfe/trunk/lib/Basic/FileManager.cpp<br class="">
cfe/trunk/unittests/Basic/FileManagerTest.cpp<br class="">
<br class="">
Modified: cfe/trunk/lib/Basic/FileManager.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=354075&r1=354074&r2=354075&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=354075&r1=354074&r2=354075&view=diff</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/lib/Basic/FileManager.cpp (original)<br class="">
+++ cfe/trunk/lib/Basic/FileManager.cpp Thu Feb 14 15:02:35 2019<br class="">
@@ -267,6 +267,9 @@ const FileEntry *FileManager::getFile(St<br class="">
if (UFE.File) {<br class="">
if (auto PathName = UFE.File->getName())<br class="">
fillRealPathName(&UFE, *PathName);<br class="">
+ } else if (!openFile) {<br class="">
+ // We should still fill the path even if we aren't opening the file.<br class="">
+ fillRealPathName(&UFE, InterndFileName);<br class="">
}<br class="">
return &UFE;<br class="">
}<br class="">
<br class="">
Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/FileManagerTest.cpp?rev=354075&r1=354074&r2=354075&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/FileManagerTest.cpp?rev=354075&r1=354074&r2=354075&view=diff</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/unittests/Basic/FileManagerTest.cpp (original)<br class="">
+++ cfe/trunk/unittests/Basic/FileManagerTest.cpp Thu Feb 14 15:02:35 2019<br class="">
@@ -346,4 +346,18 @@ TEST_F(FileManagerTest, getVirtualFileFi<br class="">
EXPECT_EQ(file->tryGetRealPathName(), ExpectedResult);<br class="">
}<br class="">
<br class="">
+TEST_F(FileManagerTest, getFileDontOpenRealPath) {<br class="">
+ auto statCache = llvm::make_unique<FakeStatCache>();<br class="">
+ statCache->InjectDirectory("/tmp/abc", 42);<br class="">
+ SmallString<64> Path("/tmp/abc/foo.cpp");<br class="">
+ statCache->InjectFile(Path.str().str().c_str(), 43);<br class="">
+ manager.setStatCache(std::move(statCache));<br class="">
+<br class="">
+ const FileEntry *file = manager.getFile(Path, /*openFile=*/false);<br class="">
+<br class="">
+ ASSERT_TRUE(file != nullptr);<br class="">
+<br class="">
+ ASSERT_EQ(file->tryGetRealPathName(), Path);<br class="">
+}<br class="">
+<br class="">
} // anonymous namespace<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">
</blockquote></div>
_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>