[llvm-bugs] [Bug 46187] New: tests in ClangScanDeps fail on Windows due to bad path concatenation
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 3 15:31:10 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46187
Bug ID: 46187
Summary: tests in ClangScanDeps fail on Windows due to bad path
concatenation
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: ctetreau at quicinc.com
CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org
The following tests fail on Windows:
Clang :: ClangScanDeps/header_stat_before_open.m
Clang :: ClangScanDeps/static-analyzer.c
Clang :: ClangScanDeps/vfsoverlay.cpp
After troubleshooting, I narrowed the issue down to line 785 of
clang/lib/Lex/HeaderSearch.cpp. On this line, rather than calling
llvm::sys::path::append, a filename is constructed by pushing '/' onto the end
of the directory name, then doing a string concat to append the file name. This
has a few issues including:
- not correctly handling directory names with an existing trailing path
separator
- not correctly handling windows path separators
A fix had previously been pushed
(https://github.com/llvm/llvm-project/commit/1cf6c28a9c0c507a224889263a20df42fd791cb9),
then reverted
(https://github.com/llvm/llvm-project/commit/cf385dc8879f05581e94944d8ae7f00138c9ed72)
for this. I attempted to restore the fix to see why it was reverted and noted
that it causes several test failures:
Clang-Unit.Tooling/Syntax/_/SyntaxTests_exe::TokenCollectorTest.MultiFile
Clang-Unit.Tooling/_/ToolingTests_exe::TransformerTest.MultipleFiles
Clang.Index/skip-parsed-bodies::compile_commands.json
Clang.Misc::remap-file.c
Clang.Modules::filename.cpp
Clang.Modules::malformed.cpp
Clang.Modules::module-debuginfo-prefix.m
Clang.Preprocessor::file_test_windows.c
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200603/b2296fb8/attachment.html>
More information about the llvm-bugs
mailing list