[PATCH] D90121: clang-format: Add a consumer to diagnostics engine
Kirill Dmitrenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 30 09:53:44 PDT 2020
dmikis added a comment.
@thakis I've got test working, here's the code:
// RUN: chmod +w %t.dir || true
// RUN: rm -rf %t.dir
// RUN: mkdir %t.dir
// RUN: cp %s %t.dir/read-only.cpp
// RUN: chmod -w %t.dir
// RUN: clang-format -style=LLVM -i %t.dir/read-only.cpp || test $? == 1
int main() {
return 0; }
There's a difference in how Linux and Windows behaves. Linux unlinks read-only file without any errors as long as directory files resides in is writable. That's why I run chmod on directory, not the file.
I can't check it on Windows. It seems tests aren't designed to run on windows at all because of it's obvious reliance on unix-like environment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90121/new/
https://reviews.llvm.org/D90121
More information about the cfe-commits
mailing list