diff --git a/Tests/GlobalIncludes.cc b/Tests/GlobalIncludes.cc new file mode 100644 index 0000000..305c437 --- /dev/null +++ b/Tests/GlobalIncludes.cc @@ -0,0 +1,10 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "[{\"directory\":\"%p\",\"command\":\"clang++ -c GlobalIncludes.cc -I%p/include\",\"file\":\"%t/GlobalIncludes.obj\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json +// RUN: %idt -p %t -export-macro IDT_TEST_ABI %s 2>&1 | %FileCheck %s +#include +// CHECK: [[PATH:(.*[\\\/])?include[\\\/]GlobalHeader\.h]]:1:1: remark: unexported public interface 'globalFunction' + +static void testFunction() { + globalFunction(); +} diff --git a/Tests/include/GlobalHeader.h b/Tests/include/GlobalHeader.h new file mode 100644 index 0000000..81ecd10 --- /dev/null +++ b/Tests/include/GlobalHeader.h @@ -0,0 +1 @@ +void globalFunction(); diff --git a/Tests/lit.cfg b/Tests/lit.cfg index 6e4053d..28f2a20 100644 --- a/Tests/lit.cfg +++ b/Tests/lit.cfg @@ -39,7 +39,7 @@ if not use_lit_shell: config.test_format = lit.formats.ShTest(execute_external = False) -config.suffixes = ['.hh'] +config.suffixes = ['.hh', '.cc'] config.excludes = ['CMakeLists.txt'] config.test_source_root = os.path.join(ids_src_root, 'Tests')