b95f52a9f2
git-svn-id: http://root.cern.ch/svn/root/trunk@46289 27541ba8-7e3a-0410-8455-c3a389f83636
31 lines
686 B
C
31 lines
686 B
C
// RUN: cat %s | %cling 2>&1 | FileCheck %s
|
|
// Test findArgList
|
|
|
|
#include "cling/Interpreter/Interpreter.h"
|
|
#include "cling/Interpreter/LookupHelper.h"
|
|
|
|
#include "clang/AST/Expr.h"
|
|
|
|
#include "llvm/ADT/SmallVector.h"
|
|
|
|
.rawInput 1
|
|
int a;
|
|
template<typename T> class aClass {
|
|
T f() {
|
|
return T();
|
|
}
|
|
};
|
|
.rawInput 0
|
|
const cling::LookupHelper& lookup = gCling->getLookupHelper();
|
|
llvm::SmallVector<clang::Expr*, 4> exprs;
|
|
std::string buf;
|
|
clang::PrintingPolicy Policy(G->getASTContext().getPrintingPolicy());
|
|
|
|
lookup.findArgList("a, a", exprs);
|
|
|
|
exprs[0]->dumpPretty(gCling->getSema().getASTContext());
|
|
//CHECK: a
|
|
exprs[1]->dumpPretty(gCling->getSema().getASTContext());
|
|
//CHECK: a
|
|
.q
|