[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

Byoungchan Lee via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 13 04:26:07 PDT 2024


================
@@ -48,3 +48,13 @@ int x = foo();
 //        RUN: clang-include-cleaner -edit --ignore-headers="foobar\.h,foo\.h" %t.cpp -- -I%S/Inputs/ 
 //        RUN: FileCheck --match-full-lines --check-prefix=EDIT2 %s < %t.cpp
 //  EDIT2-NOT: {{^}}#include "foo.h"{{$}}
+
+//        RUN: mkdir -p $(dirname %t)/out
----------------
bc-lee wrote:

It turns out `%T` is also deprecated. I replaced my shell invocation with `%t.dir`, as this is the recommended method, as described in [https://reviews.llvm.org/D69572](https://reviews.llvm.org/D69572). I also slightly modified the test invocation so that it works on Windows as well. (Tested on a local Windows machine.)

https://github.com/llvm/llvm-project/pull/111375


More information about the cfe-commits mailing list