[PATCH] D74790: [Sema][CodeComplete] Handle symlinks for include code completion

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 13:40:26 PST 2020


dgoldman added a comment.

In D74790#1883466 <https://reviews.llvm.org/D74790#1883466>, @dyung wrote:

> `The test you added in this change seems to be failing on Windows, can you take a look?
>
> http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14409
>
>   FAIL: Clang :: CodeCompletion/included-symlinks.cpp (1779 of 16867)
>   ******************** TEST 'Clang :: CodeCompletion/included-symlinks.cpp' FAILED ********************
>   Script:
>   --
>   : 'RUN: at line 1';   rm -rf C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp && mkdir -p C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/myproj && mkdir -p C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links
>   : 'RUN: at line 2';   touch C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foo.h && ln -s C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foo.h C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links/foo.h
>   : 'RUN: at line 3';   touch C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foobar.h && ln -s C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foobar.h C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links/foobar.h
>   : 'RUN: at line 4';   touch C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/myproj/test.h && ln -s C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/myproj C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links/myproj
>   : 'RUN: at line 8';   c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe -fsyntax-only -IC:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links -Xclang -code-completion-at=C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp:7:13 C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp | c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe -check-prefix=CHECK-1 C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp
>   : 'RUN: at line 14';   c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe -fsyntax-only -IC:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links -Xclang -code-completion-at=C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp:13:13 C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp | c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe -check-prefix=CHECK-2 C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp
>   --
>   Exit Code: 1
>  
>   Command Output (stdout):
>   --
>   $ ":" "RUN: at line 1"
>   $ "rm" "-rf" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp"
>   $ "mkdir" "-p" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/myproj"
>   $ "mkdir" "-p" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links"
>   $ ":" "RUN: at line 2"
>   $ "touch" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foo.h"
>   $ "ln" "-s" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foo.h" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links/foo.h"
>   $ ":" "RUN: at line 3"
>   $ "touch" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foobar.h"
>   $ "ln" "-s" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/foobar.h" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links/foobar.h"
>   $ ":" "RUN: at line 4"
>   $ "touch" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/myproj/test.h"
>   $ "ln" "-s" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/real/myproj" "C:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links/myproj"
>   $ ":" "RUN: at line 8"
>   $ "c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe" "-fsyntax-only" "-IC:\b\slave\clang-x64-windows-msvc\build\stage1\tools\clang\test\CodeCompletion\Output\included-symlinks.cpp.tmp/links" "-Xclang" "-code-completion-at=C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp:7:13" "C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp"
>   $ "c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe" "-check-prefix=CHECK-1" "C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp"
>   # command stderr:
>   C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\CodeCompletion\included-symlinks.cpp:9:13: error: CHECK-1: expected string not found in input
>  
>   // CHECK-1: foo.h"
>  
>               ^
>  
>   <stdin>:1:1: note: scanning from here
>  
>   COMPLETION: Pattern : fontsub.h"
>  
>   ^
>  
>   <stdin>:1:27: note: possible intended match here
>  
>   COMPLETION: Pattern : fontsub.h"
>  
>                             ^
>  
>  
>   error: command failed with exit status: 1
>  
>   --
>


Looks like I need to add a `// REQUIRES: shell` to the test, will submit a fix shortly


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74790/new/

https://reviews.llvm.org/D74790





More information about the cfe-commits mailing list