]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Preprocessor/nonportable-include-with-hmap.c
Vendor import of clang trunk r338150:
[FreeBSD/FreeBSD.git] / test / Preprocessor / nonportable-include-with-hmap.c
1 // RUN: rm -f %t.hmap
2 // RUN: %hmaptool write %S/Inputs/nonportable-hmaps/foo.hmap.json %t.hmap
3 // RUN: %clang_cc1 -Eonly                        \
4 // RUN:   -I%t.hmap \
5 // RUN:   -I%S/Inputs/nonportable-hmaps          \
6 // RUN:   %s -verify
7 //
8 // foo.hmap contains: Foo/Foo.h -> headers/foo/Foo.h
9 //
10 // Header search of "Foo/Foo.h" follows this path:
11 //  1. Look for "Foo/Foo.h".
12 //  2. Find "Foo/Foo.h" in "nonportable-hmaps/foo.hmap".
13 //  3. Look for "headers/foo/Foo.h".
14 //  4. Find "headers/foo/Foo.h" in "nonportable-hmaps".
15 //  5. Return.
16 //
17 // There is nothing nonportable; -Wnonportable-include-path should not fire.
18 #include "Foo/Foo.h" // expected-no-diagnostics