brintos

brintos / llvm-project-archived public Read only

0
0
Text · 819 B · 4b9a0e8 Raw
30 lines · c
1// RUN: %clang_cc1 -verify %s -E -o /dev/null -I%S/Inputs/include-next-1 -I%S/Inputs/include-next-2 -DTEST=12// RUN: %clang_cc1 -verify %s -E -o /dev/null -I%S/Inputs/include-next-1 -I%S/Inputs/include-next-2 -DTEST=23// RUN: %clang_cc1 -verify %s -E -o /dev/null -I%S/Inputs/include-next-1 -I%S/Inputs/include-next-2 -DTEST=34 5#if TEST == 16// expected-warning@+1 {{#include_next in primary source file}}7#include_next "bar.h"8#if BAR != 19#error wrong bar10#endif11 12#elif TEST == 213// expected-no-diagnostics14#include "foo.h"15#if BAR != 216#error wrong bar17#endif18 19#elif TEST == 320// expected-warning@foo.h:1 {{#include_next in file found relative to primary source file or found by absolute path}}21#include "Inputs/include-next-1/foo.h"22#if BAR != 123#error wrong bar24#endif25#undef BAR26 27#else28#error unknown test29#endif30