f474d63079
Consists of: ForwardDeclPrinter, adapted from clang::DeclPrinter Interpterer::GenerateAutoloadingMap for invoking the functionality It has hardcoded checks to prevent ForwardDeclPrinter from visiting decls from standard library files. This restriction will be lifted after the issues specifyed in the tests are fixed. Test cases for code which FowrardDeclPrinter can not deal with properly
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
//------------------------------------------------------------------------------
|
|
// 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 <typename T> class __attribute__((annotate("Def.h"))) Gen;
|
|
template <> class __attribute__((annotate("Def.h"))) Gen<int> ;
|
|
template <> class __attribute__((annotate("Spc.h"))) Gen<float>;
|
|
|
|
template <typename T,typename U> class __attribute__((annotate("Def.h"))) Partial;
|
|
template <typename T> class __attribute__((annotate("Spc.h"))) Partial<T,int>;
|
|
|
|
#include "Def.h"
|
|
#include "Spc.h"
|
|
|
|
//expected-no-diagnostics
|
|
.q
|