diff options
Diffstat (limited to 'test')
7 files changed, 25 insertions, 0 deletions
diff --git a/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/all.h b/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/all.h new file mode 100644 index 0000000000..0f3f0be3c7 --- /dev/null +++ b/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/all.h @@ -0,0 +1 @@ +#include "warn.h" diff --git a/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/warn.h b/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/warn.h new file mode 100644 index 0000000000..def881aa13 --- /dev/null +++ b/test/Frontend/Inputs/SystemHeaderPrefix/libs/boost/warn.h @@ -0,0 +1,2 @@ +#if BOOST +#endif diff --git a/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/all.h b/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/all.h new file mode 100644 index 0000000000..0f3f0be3c7 --- /dev/null +++ b/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/all.h @@ -0,0 +1 @@ +#include "warn.h" diff --git a/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/warn.h b/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/warn.h new file mode 100644 index 0000000000..6a0c102ea4 --- /dev/null +++ b/test/Frontend/Inputs/SystemHeaderPrefix/libs/mylib/warn.h @@ -0,0 +1,2 @@ +#if MYLIB +#endif diff --git a/test/Frontend/Inputs/SystemHeaderPrefix/src/all.h b/test/Frontend/Inputs/SystemHeaderPrefix/src/all.h new file mode 100644 index 0000000000..ace9699f85 --- /dev/null +++ b/test/Frontend/Inputs/SystemHeaderPrefix/src/all.h @@ -0,0 +1,6 @@ +#include "libs/boost/all.h" +#include "libs/mylib/all.h" + +#include "libs/boost/warn.h" +#include "libs/mylib/warn.h" +#include "src/warn.h" diff --git a/test/Frontend/Inputs/SystemHeaderPrefix/src/warn.h b/test/Frontend/Inputs/SystemHeaderPrefix/src/warn.h new file mode 100644 index 0000000000..91e2591855 --- /dev/null +++ b/test/Frontend/Inputs/SystemHeaderPrefix/src/warn.h @@ -0,0 +1,2 @@ +#if SRC +#endif diff --git a/test/Frontend/system-header-prefix.c b/test/Frontend/system-header-prefix.c new file mode 100644 index 0000000000..31194d96e5 --- /dev/null +++ b/test/Frontend/system-header-prefix.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -isystem-prefix libs/ -ino-system-prefix libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s + +#include "src/all.h" + +// CHECK-NOT: BOOST +// CHECK: libs/mylib/warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0 +// CHECK-NOT: BOOST +// CHECK: libs/mylib/warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0 +// CHECK-NOT: BOOST +// CHECK: src/warn.h:1:5: warning: 'SRC' is not defined, evaluates to 0 +// CHECK-NOT: BOOST |