// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
// RUN: clang-scan-deps -compilation-database %t/cdb.json | FileCheck %s
// CHECK: t.c
// CHECK: top.h
// CHECK: n1.h
// CHECK: n2.h
// CHECK: n3.h
//--- cdb.json.template
//--- t.c
//--- top.h
// More stuff after following '#endif', should invalidate the macro guard optimization,
// and allow `top.h` to get re-included.
//--- n1.h
//--- n2.h
//--- n3.h