[clang-tools-extra] r367264 - [clang-doc] Fix failing tests on Windows
Diego Astiazaran via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 15:03:39 PDT 2019
Author: diegoastiazaran
Date: Mon Jul 29 15:03:39 2019
New Revision: 367264
URL: http://llvm.org/viewvc/llvm-project?rev=367264&view=rev
Log:
[clang-doc] Fix failing tests on Windows
Tests on Windows were failing due to path separator differences.
Links in HTML should use posix-style paths.
Differential Revision: https://reviews.llvm.org/D65419
Modified:
clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp
Modified: clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp?rev=367264&r1=367263&r2=367264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp (original)
+++ clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp Mon Jul 29 15:03:39 2019
@@ -252,6 +252,8 @@ static std::unique_ptr<HTMLNode> genType
llvm::SmallString<128> Path =
computeRelativePath(Type.Path, CurrentDirectory);
llvm::sys::path::append(Path, Type.Name + ".html");
+ // Paths in HTML must be in posix-style
+ llvm::sys::path::native(Path, llvm::sys::path::Style::posix);
return genLink(Type.Name, Path);
}
More information about the cfe-commits
mailing list