diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-03-02 08:22:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-02 08:22:38 -0500 |
| commit | 69d2651056137eb7c6e542491ae5fd59af095022 (patch) | |
| tree | 4915e272e75b44fd368c148d5b89220bedefbc45 /tests/preprocessor | |
| parent | 620af1c60a2e84bbbc0e74f11cb9bc6a6976d9e4 (diff) | |
#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
Diffstat (limited to 'tests/preprocessor')
| -rw-r--r-- | tests/preprocessor/include-search-path.slang | 13 |
1 files changed, 13 insertions, 0 deletions
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 + |
