Mercurial > hg > CbC > CbC_llvm
view clang/test/ClangScanDeps/error.cpp @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1f2b6ac9f198 |
children |
line wrap: on
line source
// RUN: rm -rf %t // RUN: split-file %s %t //--- missing_tu.json.in [{ "directory": "DIR", "command": "clang -fsyntax-only DIR/missing_tu.c", "file": "DIR/missing_tu.c" }] //--- missing_header.json.in [{ "directory": "DIR", "command": "clang -fsyntax-only DIR/missing_header.c", "file": "DIR/missing_header.c" }] //--- missing_header.c #include "missing.h" // RUN: sed -e "s|DIR|%/t|g" %t/missing_tu.json.in > %t/missing_tu.json // RUN: not clang-scan-deps -compilation-database %t/missing_tu.json 2>%t/missing_tu.errs // RUN: echo EOF >> %t/missing_tu.errs // RUN: cat %t/missing_tu.errs | sed 's:\\\\\?:/:g' | FileCheck %s --check-prefix=CHECK-MISSING-TU -DPREFIX=%/t // CHECK-MISSING-TU: Error while scanning dependencies for [[PREFIX]]/missing_tu.c // CHECK-MISSING-TU-NEXT: error: no such file or directory: '[[PREFIX]]/missing_tu.c' // CHECK-MISSING-TU-NEXT: error: no input files // CHECK-MISSING-TU-NEXT: error: // CHECK-MISSING-TU-NEXT: EOF // RUN: sed -e "s|DIR|%/t|g" %t/missing_header.json.in > %t/missing_header.json // RUN: not clang-scan-deps -compilation-database %t/missing_header.json 2>%t/missing_header.errs // RUN: echo EOF >> %t/missing_header.errs // RUN: cat %t/missing_header.errs | sed 's:\\\\\?:/:g' | FileCheck %s --check-prefix=CHECK-MISSING-HEADER -DPREFIX=%/t // CHECK-MISSING-HEADER: Error while scanning dependencies for [[PREFIX]]/missing_header.c // CHECK-MISSING-HEADER-NEXT: fatal error: 'missing.h' file not found // CHECK-MISSING-HEADER-NEXT: EOF