28 lines · c
1// Check dependency scanning when skipping an unmatched #if2 3// RUN: rm -rf %t4// RUN: split-file %s %t5// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json6 7// RUN: not clang-scan-deps -compilation-database %t/cdb.json 2>&1 | FileCheck %s8// CHECK: header1.h:1:2: error: unterminated conditional directive9 10//--- cdb.json.template11[{12 "directory" : "DIR",13 "command" : "clang -target x86_64-apple-macosx10.7 -c DIR/test.cpp -o DIR/test.o",14 "file" : "DIR/test.o"15}]16 17//--- test.cpp18#include "header1.h"19#include "header2.h"20 21//--- header1.h22#if 023 24//--- header2.h25#ifndef _HEADER2_H_26#define _HEADER2_H_27#endif28