Skip to content

Commit

Permalink
[clang-doc] Fix failing tests on Windows
Browse files Browse the repository at this point in the history
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

llvm-svn: 367264
  • Loading branch information
DiegoAstiazaran committed Jul 29, 2019
1 parent a2a6f85 commit 6ad2151
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang-tools-extra/clang-doc/HTMLGenerator.cpp
Expand Up @@ -252,6 +252,8 @@ static std::unique_ptr<HTMLNode> genTypeReference(const Reference &Type,
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);
}

Expand Down

0 comments on commit 6ad2151

Please sign in to comment.