diff --git a/test/Autoloading/Def.h b/test/Autoloading/Def.h new file mode 100644 index 00000000..f9a25f3d --- /dev/null +++ b/test/Autoloading/Def.h @@ -0,0 +1,21 @@ +int id(int x) { + return x; +} + +class C { + //irrelevant +}; + +namespace N { + void nested() { + } +}//end namespace N + +template class Gen { +}; + +template<> class Gen { +}; + +template class Partial { +}; diff --git a/test/Autoloading/Forwarding.C b/test/Autoloading/Forwarding.C new file mode 100644 index 00000000..ef503097 --- /dev/null +++ b/test/Autoloading/Forwarding.C @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// CLING - the C++ LLVM-based InterpreterG :) +// +// This file is dual-licensed: you can choose to license it under the University +// of Illinois Open Source License or the GNU Lesser General Public License. See +// LICENSE.TXT for details. +//------------------------------------------------------------------------------ + +// RUN: cat %s | %cling -I %S -Xclang -verify +// Test forwardDeclaration +.rawInput 1 +int id(int) __attribute__((annotate("Def.h"))); + +class __attribute__((annotate("Def.h"))) C; + +namespace N { + void nested() __attribute__((annotate("Def.h"))); +} + +template class __attribute__((annotate("Def.h"))) Gen; +template <> class __attribute__((annotate("Def.h"))) Gen ; +template <> class __attribute__((annotate("Spc.h"))) Gen; + +template class __attribute__((annotate("Def.h"))) Partial; +template class __attribute__((annotate("Spc.h"))) Partial; + + +.rawInput 0 + +#include "Def.h" +#include "Spc.h" +//expected-no-diagnostics +.q diff --git a/test/Autoloading/Spc.h b/test/Autoloading/Spc.h new file mode 100644 index 00000000..e910243c --- /dev/null +++ b/test/Autoloading/Spc.h @@ -0,0 +1,5 @@ +template<> class Gen { +}; + +template class Partial { +}; \ No newline at end of file