From 69d2651056137eb7c6e542491ae5fd59af095022 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Sat, 2 Mar 2019 08:22:38 -0500 Subject: #include not using search paths (#873) * Fix warnings from visual studio due to coercion losing data. * Removed searchDirectories from FrontEndCompileRequest and use the one in Linkage as that is the one that is changed via Slang API. * * Add searchPaths back to FrontEndRequest * Add comments to explain the issue * Add a test to check include paths --- tests/preprocessor/include-search-path.slang | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/preprocessor/include-search-path.slang (limited to 'tests/preprocessor') diff --git a/tests/preprocessor/include-search-path.slang b/tests/preprocessor/include-search-path.slang new file mode 100644 index 000000000..77781b7bc --- /dev/null +++ b/tests/preprocessor/include-search-path.slang @@ -0,0 +1,13 @@ +//TEST:SIMPLE: -Itests/preprocessor/include +// #include support + +int foo() { return 0; } + +#include "pragma-once-c.h" + +// If include worked this will be defined +#ifndef ONLY_DEFINED_ONCE_C +// And so hitting this indicates and error (and will fail as bar isn't defined) +int baz() { return bar(); } +#endif + -- cgit v1.2.3