-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[clang-include-cleaner] Fix incorrect directory issue for writing files #111375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
23b90bb
eef397c
2409d6f
0c9477d
dec9be8
b39f36e
3a0f02e
c65d828
11f78a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,12 +49,15 @@ int x = foo(); | |
| // RUN: FileCheck --match-full-lines --check-prefix=EDIT2 %s < %t.cpp | ||
| // EDIT2-NOT: {{^}}#include "foo.h"{{$}} | ||
|
|
||
| // This test has commands that rely on shell capabilities that won't execute | ||
| // correctly on Windows e.g. subshell execution | ||
| // REQUIRES: shell | ||
| // RUN: mkdir -p $(dirname %t)/out | ||
|
||
| // RUN: cp %s %t.cpp | ||
| // RUN: echo "[{\"directory\":\"$(dirname %t)/out\",\"file\":\"../$(basename %t).cpp\",\"command\":\":clang++ -I%S/Inputs/ ../$(basename %t).cpp\"}]" > $(dirname %t)/out/compile_commands.json | ||
| // RUN: pushd $(dirname %t) | ||
| // RUN: clang-include-cleaner -p out -edit $(basename %t).cpp | ||
| // RUN: popd | ||
| // RUN: FileCheck --match-full-lines --check-prefix=EDIT3 %s < %t.cpp | ||
| // EDIT3: #include "foo.h" | ||
| // EDIT3-NOT: {{^}}#include "foobar.h"{{$}} | ||
| // RUN: pushd $(dirname %t) | ||
| // RUN: clang-include-cleaner -p out -edit $(basename %t).cpp | ||
| // RUN: popd | ||
| // RUN: FileCheck --match-full-lines --check-prefix=EDIT3 %s < %t.cpp | ||
| // EDIT3: #include "foo.h" | ||
| // EDIT3-NOT: {{^}}#include "foobar.h"{{$}} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't just affect that particular run, affects the whole, can you move the test into its own file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was explained in the previous comment. It now works on Windows as well.