xref: /llvm-project/clang/test/Frontend/output-paths.c (revision 7e59223ac4b045178c287a56154113d5989572f4)
1 // RUN: not %clang_cc1 -emit-llvm -o %t.doesnotexist/somename %s 2> %t
2 // RUN: FileCheck -check-prefix=OUTPUTFAIL -DMSG=%errc_ENOENT -input-file=%t %s
3 
4 // OUTPUTFAIL: error: unable to open output file '{{.*}}doesnotexist{{.}}somename': '[[MSG]]'
5 
6 // Check that -working-directory is respected when diagnosing output failures.
7 //
8 // RUN: rm -rf %t.d && mkdir -p %t.d/%basename_t-inner.d
9 // RUN: %clang_cc1 -working-directory %t.d -E -o %basename_t-inner.d/somename %s -verify
10 // expected-no-diagnostics
11 
12 // RUN: %clang_cc1 -working-directory %t.d -E %s -o - | FileCheck %s
13 // CHECK: # 1
14