Update tests to new interfaces.

This commit is contained in:
Axel Naumann 2014-02-19 12:54:31 +01:00 committed by sftnight
parent 2309fc097e
commit 2a58b82ebe
7 changed files with 197 additions and 188 deletions

View File

@ -27,11 +27,12 @@ template<typename T> class aClass {
};
.rawInput 0
const cling::LookupHelper& lookup = gCling->getLookupHelper();
cling::LookupHelper::DiagSetting diags = cling::LookupHelper::WithDiagnostics;
llvm::SmallVector<clang::Expr*, 4> exprs;
std::string buf;
clang::PrintingPolicy Policy(gCling->getSema().getASTContext().getPrintingPolicy());
lookup.findArgList("a, a", exprs);
lookup.findArgList("a, a", exprs, diags);
exprs[0]->dumpPretty(gCling->getSema().getASTContext());
//CHECK: a

View File

@ -61,6 +61,7 @@ class A {
const cling::LookupHelper& lookup = gCling->getLookupHelper();
cling::LookupHelper::DiagSetting diags = cling::LookupHelper::WithDiagnostics;
std::string buf;
clang::PrintingPolicy Policy(gCling->getSema().getASTContext().getPrintingPolicy());
@ -68,7 +69,7 @@ clang::PrintingPolicy Policy(gCling->getSema().getASTContext().getPrintingPolicy
// We need to fetch the global scope declaration,
// otherwise known as the translation unit decl.
//
const clang::Decl* G = lookup.findScope("");
const clang::Decl* G = lookup.findScope("", diags);
printf("G: 0x%lx\n", (unsigned long) G);
//CHECK: G: 0x{{[1-9a-f][0-9a-f]*$}}
@ -76,15 +77,15 @@ printf("G: 0x%lx\n", (unsigned long) G);
// We need these class declarations.
//
const clang::Decl* class_tempFlt = lookup.findScope("aTemplate<float>");
const clang::Decl* class_tempFlt = lookup.findScope("aTemplate<float>", diags);
printf("class_tempFlt: 0x%lx\n", (unsigned long) class_tempFlt);
//CHECK: class_tempFlt: 0x{{[1-9a-f][0-9a-f]*$}}
const clang::Decl* class_A = lookup.findScope("A");
const clang::Decl* class_A = lookup.findScope("A", diags);
printf("class_A: 0x%lx\n", (unsigned long) class_A);
//CHECK-NEXT: class_A: 0x{{[1-9a-f][0-9a-f]*$}}
const clang::Decl* namespace_NS = lookup.findScope("NS");
const clang::Decl* namespace_NS = lookup.findScope("NS", diags);
printf("namespace_NS: 0x%lx\n", (unsigned long) namespace_NS);
//CHECK-NEXT: namespace_NS: 0x{{[1-9a-f][0-9a-f]*$}}
@ -93,43 +94,43 @@ printf("namespace_NS: 0x%lx\n", (unsigned long) namespace_NS);
//
const clang::ValueDecl *decl;
decl = lookup.findDataMember(G,"gValue");
decl = lookup.findDataMember(G,"gValue", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is not a named decl
//CHECK-NEXT: VarDecl 0x{{[1-9a-f][0-9a-f]*}} <{{.*}}> gValue 'int'
decl = lookup.findDataMember(class_tempFlt,"gValue");
decl = lookup.findDataMember(class_tempFlt,"gValue", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is aTemplate
//CHECK-NEXT: VarDecl 0x{{[1-9a-f][0-9a-f]*}} <{{.*}}> gValue 'float':'float' static
decl = lookup.findDataMember(class_tempFlt,"fMember");
decl = lookup.findDataMember(class_tempFlt,"fMember", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is aTemplate
//CHECK-NEXT: FieldDecl 0x{{[1-9a-f][0-9a-f]*}} <{{.*}}> fMember 'float':'float'
decl = lookup.findDataMember(namespace_NS,"gValue");
decl = lookup.findDataMember(namespace_NS,"gValue", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is NS
//CHECK-NEXT: VarDecl 0x{{[1-9a-f][0-9a-f]*}} <{{.*}}> gValue 'double'
decl = lookup.findDataMember(namespace_NS,"gValue2");
decl = lookup.findDataMember(namespace_NS,"gValue2", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is NS
//CHECK-NEXT: VarDecl 0x{{[1-9a-f][0-9a-f]*}} <{{.*}}> gValue2 'double'
decl = lookup.findDataMember(class_A,"gValue");
decl = lookup.findDataMember(class_A,"gValue", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is A
//CHECK-NEXT: VarDecl 0x{{[1-9a-f][0-9a-f]*}} <{{.*}}> gValue 'short' static
decl = lookup.findDataMember(class_A,"fMember");
decl = lookup.findDataMember(class_A,"fMember", diags);
printScope(decl->getDeclContext());
decl->dump();
//CHECK-NEXT: Context is A

View File

@ -40,7 +40,8 @@ void dumpDecl(const char* title, const clang::Decl* D) {
// otherwise known as the translation unit decl.
//
const cling::LookupHelper& lookup = gCling->getLookupHelper();
const clang::Decl* G = lookup.findScope("");
cling::LookupHelper::DiagSetting diags = cling::LookupHelper::WithDiagnostics;
const clang::Decl* G = lookup.findScope("", diags);
printf("G: 0x%lx\n", (unsigned long) G);
//CHECK: G: 0x{{[1-9a-f][0-9a-f]*$}}
@ -147,11 +148,11 @@ char b_ary_arena[256];
// We need these class declarations.
//
const clang::Decl* class_A = lookup.findScope("A");
const clang::Decl* class_A = lookup.findScope("A", diags);
printf("class_A: 0x%lx\n", (unsigned long) class_A);
//CHECK: class_A: 0x{{[1-9a-f][0-9a-f]*$}}
const clang::Decl* class_B = lookup.findScope("B");
const clang::Decl* class_B = lookup.findScope("B", diags);
printf("class_B: 0x%lx\n", (unsigned long) class_B);
//CHECK-NEXT: class_B: 0x{{[1-9a-f][0-9a-f]*$}}
@ -161,7 +162,7 @@ printf("class_B: 0x%lx\n", (unsigned long) class_B);
// We need to fetch the namespace N declaration.
//
const clang::Decl* namespace_N = lookup.findScope("N");
const clang::Decl* namespace_N = lookup.findScope("N", diags);
printf("namespace_N: 0x%lx\n", (unsigned long) namespace_N);
//CHECK: namespace_N: 0x{{[1-9a-f][0-9a-f]*$}}
@ -171,8 +172,8 @@ printf("namespace_N: 0x%lx\n", (unsigned long) namespace_N);
// Test finding a global function taking no args.
//
const clang::FunctionDecl* G_f_args = lookup.findFunctionArgs(G, "G_f", "");
const clang::FunctionDecl* G_f_proto = lookup.findFunctionProto(G, "G_f", "");
const clang::FunctionDecl* G_f_args = lookup.findFunctionArgs(G, "G_f", "", diags);
const clang::FunctionDecl* G_f_proto = lookup.findFunctionProto(G, "G_f", "", diags);
printf("G_f_args: 0x%lx\n", (unsigned long) G_f_args);
//CHECK-NEXT: G_f_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -194,8 +195,8 @@ G_f_proto->print(llvm::errs());
// Test finding a global function taking a single int argument.
//
const clang::FunctionDecl* G_a_args = lookup.findFunctionArgs(G, "G_a", "0");
const clang::FunctionDecl* G_a_proto = lookup.findFunctionProto(G, "G_a", "int");
const clang::FunctionDecl* G_a_args = lookup.findFunctionArgs(G, "G_a", "0", diags);
const clang::FunctionDecl* G_a_proto = lookup.findFunctionProto(G, "G_a", "int", diags);
printf("G_a_args: 0x%lx\n", (unsigned long) G_a_args);
//CHECK: G_a_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -217,8 +218,8 @@ G_a_proto->print(llvm::errs());
// Test finding a global function taking an int and a double argument.
//
const clang::FunctionDecl* G_b_args = lookup.findFunctionArgs(G, "G_b", "0,0.0");
const clang::FunctionDecl* G_b_proto = lookup.findFunctionProto(G, "G_b", "int,double");
const clang::FunctionDecl* G_b_args = lookup.findFunctionArgs(G, "G_b", "0,0.0", diags);
const clang::FunctionDecl* G_b_proto = lookup.findFunctionProto(G, "G_b", "int,double", diags);
printf("G_b_args: 0x%lx\n", (unsigned long) G_b_args);
//CHECK: G_b_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -242,8 +243,8 @@ G_b_proto->print(llvm::errs());
// Test finding a global overloaded function.
//
const clang::FunctionDecl* G_c1_args = lookup.findFunctionArgs(G, "G_c", "0,0");
const clang::FunctionDecl* G_c1_proto = lookup.findFunctionProto(G, "G_c", "int,int");
const clang::FunctionDecl* G_c1_args = lookup.findFunctionArgs(G, "G_c", "0,0", diags);
const clang::FunctionDecl* G_c1_proto = lookup.findFunctionProto(G, "G_c", "int,int", diags);
printf("G_c1_args: 0x%lx\n", (unsigned long) G_c1_args);
//CHECK: G_c1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -261,8 +262,8 @@ G_c1_proto->print(llvm::errs());
//CHECK-NEXT: int y = vj;
//CHECK-NEXT: }
const clang::FunctionDecl* G_c2_args = lookup.findFunctionArgs(G, "G_c", "0,0.0");
const clang::FunctionDecl* G_c2_proto = lookup.findFunctionProto(G, "G_c", "int,double");
const clang::FunctionDecl* G_c2_args = lookup.findFunctionArgs(G, "G_c", "0,0.0", diags);
const clang::FunctionDecl* G_c2_proto = lookup.findFunctionProto(G, "G_c", "int,double", diags);
printf("G_c2_args: 0x%lx\n", (unsigned long) G_c2_args);
//CHECK: G_c2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -286,8 +287,8 @@ G_c2_proto->print(llvm::errs());
// Test finding simple global template instantiations.
//
const clang::FunctionDecl* G_d1_args = lookup.findFunctionArgs(G, "G_d<int>", "0");
const clang::FunctionDecl* G_d1_proto = lookup.findFunctionProto(G, "G_d<int>", "int");
const clang::FunctionDecl* G_d1_args = lookup.findFunctionArgs(G, "G_d<int>", "0", diags);
const clang::FunctionDecl* G_d1_proto = lookup.findFunctionProto(G, "G_d<int>", "int", diags);
printf("G_d1_args: 0x%lx\n", (unsigned long) G_d1_args);
//CHECK: G_d1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -303,8 +304,8 @@ G_d1_proto->print(llvm::errs());
//CHECK-NEXT: int x = v;
//CHECK-NEXT: }
const clang::FunctionDecl* G_d2_args = lookup.findFunctionArgs(G, "G_d<double>", "0.0");
const clang::FunctionDecl* G_d2_proto = lookup.findFunctionProto(G, "G_d<double>", "double");
const clang::FunctionDecl* G_d2_args = lookup.findFunctionArgs(G, "G_d<double>", "0.0", diags);
const clang::FunctionDecl* G_d2_proto = lookup.findFunctionProto(G, "G_d<double>", "double", diags);
printf("G_d2_args: 0x%lx\n", (unsigned long) G_d2_args);
//CHECK: G_d2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -326,8 +327,8 @@ G_d2_proto->print(llvm::errs());
// Test finding a namespace function taking no args.
//
const clang::FunctionDecl* H_f_args = lookup.findFunctionArgs(namespace_N, "H_f", "");
const clang::FunctionDecl* H_f_proto = lookup.findFunctionProto(namespace_N, "H_f", "");
const clang::FunctionDecl* H_f_args = lookup.findFunctionArgs(namespace_N, "H_f", "", diags);
const clang::FunctionDecl* H_f_proto = lookup.findFunctionProto(namespace_N, "H_f", "", diags);
printf("H_f_args: 0x%lx\n", (unsigned long) H_f_args);
//CHECK: H_f_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -349,8 +350,8 @@ H_f_proto->print(llvm::errs());
// Test finding a namespace function taking a single int argument.
//
const clang::FunctionDecl* H_a_args = lookup.findFunctionArgs(namespace_N, "H_a", "0");
const clang::FunctionDecl* H_a_proto = lookup.findFunctionProto(namespace_N, "H_a", "int");
const clang::FunctionDecl* H_a_args = lookup.findFunctionArgs(namespace_N, "H_a", "0", diags);
const clang::FunctionDecl* H_a_proto = lookup.findFunctionProto(namespace_N, "H_a", "int", diags);
printf("H_a_args: 0x%lx\n", (unsigned long) H_a_args);
//CHECK: H_a_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -372,8 +373,8 @@ H_a_proto->print(llvm::errs());
// Test finding a namespace function taking an int and a double argument.
//
const clang::FunctionDecl* H_b_args = lookup.findFunctionArgs(namespace_N, "H_b", "0,0.0");
const clang::FunctionDecl* H_b_proto = lookup.findFunctionProto(namespace_N, "H_b", "int,double");
const clang::FunctionDecl* H_b_args = lookup.findFunctionArgs(namespace_N, "H_b", "0,0.0", diags);
const clang::FunctionDecl* H_b_proto = lookup.findFunctionProto(namespace_N, "H_b", "int,double", diags);
printf("H_b_args: 0x%lx\n", (unsigned long) H_b_args);
//CHECK: H_b_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -397,8 +398,8 @@ H_b_proto->print(llvm::errs());
// Test finding a namespace overloaded function.
//
const clang::FunctionDecl* H_c1_args = lookup.findFunctionArgs(namespace_N, "H_c", "0,0");
const clang::FunctionDecl* H_c1_proto = lookup.findFunctionProto(namespace_N, "H_c", "int,int");
const clang::FunctionDecl* H_c1_args = lookup.findFunctionArgs(namespace_N, "H_c", "0,0", diags);
const clang::FunctionDecl* H_c1_proto = lookup.findFunctionProto(namespace_N, "H_c", "int,int", diags);
printf("H_c1_args: 0x%lx\n", (unsigned long) H_c1_args);
//CHECK: H_c1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -416,8 +417,8 @@ H_c1_proto->print(llvm::errs());
//CHECK-NEXT: int y = vj;
//CHECK-NEXT: }
const clang::FunctionDecl* H_c2_args = lookup.findFunctionArgs(namespace_N, "H_c", "0,0.0");
const clang::FunctionDecl* H_c2_proto = lookup.findFunctionProto(namespace_N, "H_c", "int,double");
const clang::FunctionDecl* H_c2_args = lookup.findFunctionArgs(namespace_N, "H_c", "0,0.0", diags);
const clang::FunctionDecl* H_c2_proto = lookup.findFunctionProto(namespace_N, "H_c", "int,double", diags);
printf("H_c2_args: 0x%lx\n", (unsigned long) H_c2_args);
//CHECK: H_c2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -441,8 +442,8 @@ H_c2_proto->print(llvm::errs());
// Test finding simple namespace template instantiations.
//
const clang::FunctionDecl* H_d1_args = lookup.findFunctionArgs(namespace_N, "H_d<int>", "0");
const clang::FunctionDecl* H_d1_proto = lookup.findFunctionProto(namespace_N, "H_d<int>", "int");
const clang::FunctionDecl* H_d1_args = lookup.findFunctionArgs(namespace_N, "H_d<int>", "0", diags);
const clang::FunctionDecl* H_d1_proto = lookup.findFunctionProto(namespace_N, "H_d<int>", "int", diags);
printf("H_d1_args: 0x%lx\n", (unsigned long) H_d1_args);
//CHECK: H_d1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -458,8 +459,8 @@ H_d1_proto->print(llvm::errs());
//CHECK-NEXT: int x = v;
//CHECK-NEXT: }
const clang::FunctionDecl* H_d2_args = lookup.findFunctionArgs(namespace_N, "H_d<double>", "0.0");
const clang::FunctionDecl* H_d2_proto = lookup.findFunctionProto(namespace_N, "H_d<double>", "double");
const clang::FunctionDecl* H_d2_args = lookup.findFunctionArgs(namespace_N, "H_d<double>", "0.0", diags);
const clang::FunctionDecl* H_d2_proto = lookup.findFunctionProto(namespace_N, "H_d<double>", "double", diags);
printf("H_d2_args: 0x%lx\n", (unsigned long) H_d2_args);
//CHECK: H_d2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -481,8 +482,8 @@ H_d2_proto->print(llvm::errs());
// Test finding a member function taking no args.
//
const clang::FunctionDecl* func_A_f_args = lookup.findFunctionArgs(class_A, "A_f", "");
const clang::FunctionDecl* func_A_f_proto = lookup.findFunctionProto(class_A, "A_f", "");
const clang::FunctionDecl* func_A_f_args = lookup.findFunctionArgs(class_A, "A_f", "", diags);
const clang::FunctionDecl* func_A_f_proto = lookup.findFunctionProto(class_A, "A_f", "", diags);
printf("func_A_f_args: 0x%lx\n", (unsigned long) func_A_f_args);
//CHECK: func_A_f_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -504,8 +505,8 @@ func_A_f_proto->print(llvm::errs());
// Test finding a member function taking an int arg.
//
const clang::FunctionDecl* func_A_g_args = lookup.findFunctionArgs(class_A, "A_g", "0");
const clang::FunctionDecl* func_A_g_proto = lookup.findFunctionProto(class_A, "A_g", "int");
const clang::FunctionDecl* func_A_g_args = lookup.findFunctionArgs(class_A, "A_g", "0", diags);
const clang::FunctionDecl* func_A_g_proto = lookup.findFunctionProto(class_A, "A_g", "int", diags);
printf("func_A_g_args: 0x%lx\n", (unsigned long) func_A_g_args);
//CHECK: func_A_g_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -527,8 +528,8 @@ func_A_g_proto->print(llvm::errs());
// Test finding a member function taking an int and a double argument.
//
const clang::FunctionDecl* func_A_h_args = lookup.findFunctionArgs(class_A, "A_h", "0,0.0");
const clang::FunctionDecl* func_A_h_proto = lookup.findFunctionProto(class_A, "A_h", "int,double");
const clang::FunctionDecl* func_A_h_args = lookup.findFunctionArgs(class_A, "A_h", "0,0.0", diags);
const clang::FunctionDecl* func_A_h_proto = lookup.findFunctionProto(class_A, "A_h", "int,double", diags);
printf("func_A_h_args: 0x%lx\n", (unsigned long) func_A_h_args);
//CHECK: func_A_h_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -552,8 +553,8 @@ func_A_h_proto->print(llvm::errs());
// Test finding an overloaded member function.
//
const clang::FunctionDecl* func_A_j1_args = lookup.findFunctionArgs(class_A, "A_j", "0,0");
const clang::FunctionDecl* func_A_j1_proto = lookup.findFunctionProto(class_A, "A_j", "int,int");
const clang::FunctionDecl* func_A_j1_args = lookup.findFunctionArgs(class_A, "A_j", "0,0", diags);
const clang::FunctionDecl* func_A_j1_proto = lookup.findFunctionProto(class_A, "A_j", "int,int", diags);
printf("func_A_j1_args: 0x%lx\n", (unsigned long) func_A_j1_args);
//CHECK: func_A_j1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -571,8 +572,8 @@ func_A_j1_proto->print(llvm::errs());
//CHECK-NEXT: int y = vj;
//CHECK-NEXT: }
const clang::FunctionDecl* func_A_j2_args = lookup.findFunctionArgs(class_A, "A_j", "0,0.0");
const clang::FunctionDecl* func_A_j2_proto = lookup.findFunctionProto(class_A, "A_j", "int,double");
const clang::FunctionDecl* func_A_j2_args = lookup.findFunctionArgs(class_A, "A_j", "0,0.0", diags);
const clang::FunctionDecl* func_A_j2_proto = lookup.findFunctionProto(class_A, "A_j", "int,double", diags);
printf("func_A_j2_args: 0x%lx\n", (unsigned long) func_A_j2_args);
//CHECK: func_A_j2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -596,8 +597,8 @@ func_A_j2_proto->print(llvm::errs());
// Test finding simple member function template instantiations.
//
const clang::FunctionDecl* func_A_k1_args = lookup.findFunctionArgs(class_A, "A_k<int>", "0");
const clang::FunctionDecl* func_A_k1_proto = lookup.findFunctionProto(class_A, "A_k<int>", "int");
const clang::FunctionDecl* func_A_k1_args = lookup.findFunctionArgs(class_A, "A_k<int>", "0", diags);
const clang::FunctionDecl* func_A_k1_proto = lookup.findFunctionProto(class_A, "A_k<int>", "int", diags);
printf("func_A_k1_args: 0x%lx\n", (unsigned long) func_A_k1_args);
//CHECK: func_A_k1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -613,8 +614,8 @@ func_A_k1_proto->print(llvm::errs());
//CHECK-NEXT: int x = v;
//CHECK-NEXT: }
const clang::FunctionDecl* func_A_k2_args = lookup.findFunctionArgs(class_A, "A_k<double>", "0.0");
const clang::FunctionDecl* func_A_k2_proto = lookup.findFunctionProto(class_A, "A_k<double>", "double");
const clang::FunctionDecl* func_A_k2_args = lookup.findFunctionArgs(class_A, "A_k<double>", "0.0", diags);
const clang::FunctionDecl* func_A_k2_proto = lookup.findFunctionProto(class_A, "A_k<double>", "double", diags);
printf("func_A_k2_args: 0x%lx\n", (unsigned long) func_A_k2_args);
//CHECK: func_A_k2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -636,8 +637,8 @@ func_A_k2_proto->print(llvm::errs());
// Test finding a member function taking a const int reference arg.
//
const clang::FunctionDecl* func_A_m_args = lookup.findFunctionArgs(class_A, "A_m", "0");
const clang::FunctionDecl* func_A_m_proto = lookup.findFunctionProto(class_A, "A_m", "const int&");
const clang::FunctionDecl* func_A_m_args = lookup.findFunctionArgs(class_A, "A_m", "0", diags);
const clang::FunctionDecl* func_A_m_proto = lookup.findFunctionProto(class_A, "A_m", "const int&", diags);
printf("func_A_m_args: 0x%lx\n", (unsigned long) func_A_m_args);
//CHECK: func_A_m_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -656,8 +657,8 @@ func_A_m_proto->print(llvm::errs());
//
// Test finding a member function taking an obj reference arg.
//
const clang::FunctionDecl* func_A_n_args = lookup.findFunctionArgs(class_A, "A_n", "*(new B())");
const clang::FunctionDecl* func_A_n_proto = lookup.findFunctionProto(class_A, "A_n", "B&");
const clang::FunctionDecl* func_A_n_args = lookup.findFunctionArgs(class_A, "A_n", "*(new B())", diags);
const clang::FunctionDecl* func_A_n_proto = lookup.findFunctionProto(class_A, "A_n", "B&", diags);
printf("func_A_n_args: 0x%lx\n", (unsigned long) func_A_n_args);
//CHECK: func_A_n_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -676,8 +677,8 @@ func_A_n_proto->print(llvm::errs());
//
// Test finding a member function taking with a default argument.
//
const clang::FunctionDecl* func_A_n2_args = lookup.findFunctionArgs(class_A, "A_n", "\"\"");
const clang::FunctionDecl* func_A_n2_proto = lookup.findFunctionProto(class_A, "A_n", "const char *");
const clang::FunctionDecl* func_A_n2_args = lookup.findFunctionArgs(class_A, "A_n", "\"\"", diags);
const clang::FunctionDecl* func_A_n2_proto = lookup.findFunctionProto(class_A, "A_n", "const char *", diags);
printf("func_A_n2_args: 0x%lx\n", (unsigned long) func_A_n2_args);
//CHECK: func_A_n2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -700,8 +701,8 @@ func_A_n2_proto->print(llvm::errs());
// Test finding a member function taking no args in a base class.
//
const clang::FunctionDecl* func_B_F_args = lookup.findFunctionArgs(class_A, "B_f", "");
const clang::FunctionDecl* func_B_F_proto = lookup.findFunctionProto(class_A, "B_f", "");
const clang::FunctionDecl* func_B_F_args = lookup.findFunctionArgs(class_A, "B_f", "", diags);
const clang::FunctionDecl* func_B_F_proto = lookup.findFunctionProto(class_A, "B_f", "", diags);
printf("func_B_F_args: 0x%lx\n", (unsigned long) func_B_F_args);
//CHECK: func_B_F_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -723,8 +724,8 @@ func_B_F_proto->print(llvm::errs());
// Test finding a member function taking an int arg in a base class.
//
const clang::FunctionDecl* func_B_G_args = lookup.findFunctionArgs(class_A, "B_g", "0");
const clang::FunctionDecl* func_B_G_proto = lookup.findFunctionProto(class_A, "B_g", "int");
const clang::FunctionDecl* func_B_G_args = lookup.findFunctionArgs(class_A, "B_g", "0", diags);
const clang::FunctionDecl* func_B_G_proto = lookup.findFunctionProto(class_A, "B_g", "int", diags);
printf("func_B_G_args: 0x%lx\n", (unsigned long) func_B_G_args);
//CHECK: func_B_G_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -747,8 +748,8 @@ func_B_G_proto->print(llvm::errs());
// in a base class.
//
const clang::FunctionDecl* func_B_h_args = lookup.findFunctionArgs(class_A, "B_h", "0,0.0");
const clang::FunctionDecl* func_B_h_proto = lookup.findFunctionProto(class_A, "B_h", "int,double");
const clang::FunctionDecl* func_B_h_args = lookup.findFunctionArgs(class_A, "B_h", "0,0.0", diags);
const clang::FunctionDecl* func_B_h_proto = lookup.findFunctionProto(class_A, "B_h", "int,double", diags);
printf("func_B_h_args: 0x%lx\n", (unsigned long) func_B_h_args);
//CHECK: func_B_h_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -772,12 +773,12 @@ func_B_h_proto->print(llvm::errs());
// in a base class using the preparse types.
//
llvm::SmallVector<clang::QualType, 4> types;
types.push_back(lookup.findType("int"));
types.push_back(lookup.findType("float"));
const clang::FunctionDecl* func_B_h_proto_type = lookup.findFunctionProto(class_A, "B_h", types);
types.push_back(lookup.findType("int", diags));
types.push_back(lookup.findType("float", diags));
const clang::FunctionDecl* func_B_h_proto_type = lookup.findFunctionProto(class_A, "B_h", types, diags);
types.pop_back();
types.push_back(lookup.findType("double"));
const clang::FunctionDecl* func_B_h_match_proto_type = lookup.matchFunctionProto(class_A, "B_h", types, false);
types.push_back(lookup.findType("double", diags));
const clang::FunctionDecl* func_B_h_match_proto_type = lookup.matchFunctionProto(class_A, "B_h", types, diags, false);
printf("func_B_h_proto_type: 0x%lx\n", (unsigned long) func_B_h_proto_type);
//CHECK: func_B_h_proto_type: 0x{{[1-9a-f][0-9a-f]*$}}
@ -800,8 +801,8 @@ func_B_h_match_proto_type->print(llvm::errs());
// Test finding an overloaded member function in a base class.
//
const clang::FunctionDecl* func_B_j1_args = lookup.findFunctionArgs(class_A, "B_j", "0,0");
const clang::FunctionDecl* func_B_j1_proto = lookup.findFunctionProto(class_A, "B_j", "int,int");
const clang::FunctionDecl* func_B_j1_args = lookup.findFunctionArgs(class_A, "B_j", "0,0", diags);
const clang::FunctionDecl* func_B_j1_proto = lookup.findFunctionProto(class_A, "B_j", "int,int", diags);
printf("func_B_j1_args: 0x%lx\n", (unsigned long) func_B_j1_args);
//CHECK: func_B_j1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -819,8 +820,8 @@ func_B_j1_proto->print(llvm::errs());
//CHECK-NEXT: int y = vj;
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_j2_args = lookup.findFunctionArgs(class_A, "B_j", "0,0.0");
const clang::FunctionDecl* func_B_j2_proto = lookup.findFunctionProto(class_A, "B_j", "int,double");
const clang::FunctionDecl* func_B_j2_args = lookup.findFunctionArgs(class_A, "B_j", "0,0.0", diags);
const clang::FunctionDecl* func_B_j2_proto = lookup.findFunctionProto(class_A, "B_j", "int,double", diags);
printf("func_B_j2_args: 0x%lx\n", (unsigned long) func_B_j2_args);
//CHECK: func_B_j2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -844,8 +845,8 @@ func_B_j2_proto->print(llvm::errs());
// Test finding simple member function template instantiations in a base class.
//
const clang::FunctionDecl* func_B_k1_args = lookup.findFunctionArgs(class_A, "B_k<int>", "0");
const clang::FunctionDecl* func_B_k1_proto = lookup.findFunctionProto(class_A, "B_k<int>", "int");
const clang::FunctionDecl* func_B_k1_args = lookup.findFunctionArgs(class_A, "B_k<int>", "0", diags);
const clang::FunctionDecl* func_B_k1_proto = lookup.findFunctionProto(class_A, "B_k<int>", "int", diags);
printf("func_B_k1_args: 0x%lx\n", (unsigned long) func_B_k1_args);
//CHECK: func_B_k1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -861,8 +862,8 @@ func_B_k1_proto->print(llvm::errs());
//CHECK-NEXT: int x = v;
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_k2_args = lookup.findFunctionArgs(class_A, "B_k<double>", "0.0");
const clang::FunctionDecl* func_B_k2_proto = lookup.findFunctionProto(class_A, "B_k<double>", "double");
const clang::FunctionDecl* func_B_k2_args = lookup.findFunctionArgs(class_A, "B_k<double>", "0.0", diags);
const clang::FunctionDecl* func_B_k2_proto = lookup.findFunctionProto(class_A, "B_k<double>", "double", diags);
printf("func_B_k2_args: 0x%lx\n", (unsigned long) func_B_k2_args);
//CHECK: func_B_k2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -882,8 +883,8 @@ func_B_k2_proto->print(llvm::errs());
// Test finding a member function taking a const int reference arg in a base class.
//
const clang::FunctionDecl* func_B_m_args = lookup.findFunctionArgs(class_A, "B_m", "0");
const clang::FunctionDecl* func_B_m_proto = lookup.findFunctionProto(class_A, "B_m", "const int&");
const clang::FunctionDecl* func_B_m_args = lookup.findFunctionArgs(class_A, "B_m", "0", diags);
const clang::FunctionDecl* func_B_m_proto = lookup.findFunctionProto(class_A, "B_m", "const int&", diags);
printf("func_B_m_args: 0x%lx\n", (unsigned long) func_B_m_args);
//CHECK: func_B_m_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -904,8 +905,8 @@ func_B_m_proto->print(llvm::errs());
// Test finding a member function that are const or not
//
const clang::FunctionDecl* func_B_n_args = lookup.findFunctionArgs(class_A, "B_n", "", false);
const clang::FunctionDecl* func_B_n_proto = lookup.findFunctionProto(class_A, "B_n", "", false);
const clang::FunctionDecl* func_B_n_args = lookup.findFunctionArgs(class_A, "B_n", "", diags, false);
const clang::FunctionDecl* func_B_n_proto = lookup.findFunctionProto(class_A, "B_n", "", diags, false);
printf("func_B_n_args: 0x%lx\n", (unsigned long) func_B_n_args);
//CHECK: func_B_n_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -921,8 +922,8 @@ func_B_n_proto->print(llvm::errs());
//CHECK-NEXT: return this->m_B_i;
//CHECK-NEXT: }
const clang::FunctionDecl* func_const_B_n_args = lookup.findFunctionArgs(class_A, "B_n", "", true);
const clang::FunctionDecl* func_const_B_n_proto = lookup.findFunctionProto(class_A, "B_n", "", true);
const clang::FunctionDecl* func_const_B_n_args = lookup.findFunctionArgs(class_A, "B_n", "", diags, true);
const clang::FunctionDecl* func_const_B_n_proto = lookup.findFunctionProto(class_A, "B_n", "", diags, true);
printf("func_const_B_n_args: 0x%lx\n", (unsigned long) func_const_B_n_args);
//CHECK: func_const_B_n_args: 0x{{[1-9a-f][0-9a-f]*$}}
func_const_B_n_args->print(llvm::errs());
@ -937,8 +938,8 @@ func_const_B_n_proto->print(llvm::errs());
//CHECK-NEXT: return this->m_B_i;
//CHECK-NEXT: }
const clang::FunctionDecl* func_const_B_m_proto = lookup.findFunctionProto(class_A, "B_m", "const int&", true);
const clang::FunctionDecl* func_const_B_o_proto = lookup.findFunctionProto(class_A, "B_o", "", true);
const clang::FunctionDecl* func_const_B_m_proto = lookup.findFunctionProto(class_A, "B_m", "const int&", diags, true);
const clang::FunctionDecl* func_const_B_o_proto = lookup.findFunctionProto(class_A, "B_o", "", diags, true);
printf("func_const_B_m_proto: 0x%lx\n", (unsigned long) func_const_B_m_proto);
//CHECK: func_const_B_m_proto: 0x0
@ -950,7 +951,7 @@ func_const_B_o_proto->print(llvm::errs());
//CHECK-NEXT: }
// Test exact matches
const clang::FunctionDecl* func_const_B_p_proto = lookup.findFunctionProto(class_A, "B_p", "double", true);
const clang::FunctionDecl* func_const_B_p_proto = lookup.findFunctionProto(class_A, "B_p", "double", diags, true);
printf("func_const_B_p_proto 1: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 1: 0x{{[1-9a-f][0-9a-f]*$}}
func_const_B_p_proto->print(llvm::errs());
@ -958,11 +959,11 @@ func_const_B_p_proto->print(llvm::errs());
//CHECK-NEXT: return 0;
//CHECK-NEXT: }
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "double", true);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "double", diags, true);
printf("func_const_B_p_proto 2: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 2: 0x0
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "float", true);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "float", diags, true);
printf("func_const_B_p_proto 3: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 3: 0x{{[1-9a-f][0-9a-f]*$}}
func_const_B_p_proto->print(llvm::errs());
@ -970,11 +971,11 @@ func_const_B_p_proto->print(llvm::errs());
//CHECK-NEXT: return 0;
//CHECK-NEXT: }
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "float", false);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "float", diags, false);
printf("func_const_B_p_proto 4: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 4: 0x0
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "int", false);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "int", diags, false);
printf("func_const_B_p_proto 5: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 5: 0x{{[1-9a-f][0-9a-f]*$}}
func_const_B_p_proto->print(llvm::errs());
@ -982,15 +983,15 @@ func_const_B_p_proto->print(llvm::errs());
//CHECK-NEXT: return 0;
//CHECK-NEXT: }
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "int", true);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "int", diags, true);
printf("func_const_B_p_proto 6: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 6: 0x0
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "short", false);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "short", diags, false);
printf("func_const_B_p_proto 6: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 6: 0x0
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "long", false);
func_const_B_p_proto = lookup.matchFunctionProto(class_A, "B_p", "long", diags, false);
printf("func_const_B_p_proto 6: 0x%lx\n", (unsigned long) func_const_B_p_proto);
//CHECK: func_const_B_p_proto 6: 0x0
@ -998,8 +999,8 @@ printf("func_const_B_p_proto 6: 0x%lx\n", (unsigned long) func_const_B_p_proto);
// Test finding constructors.
//
//
const clang::FunctionDecl* func_B_ctr1_args = lookup.findFunctionArgs(class_B, "B", "");
const clang::FunctionDecl* func_B_ctr1_proto = lookup.findFunctionProto(class_B, "B", "");
const clang::FunctionDecl* func_B_ctr1_args = lookup.findFunctionArgs(class_B, "B", "", diags);
const clang::FunctionDecl* func_B_ctr1_proto = lookup.findFunctionProto(class_B, "B", "", diags);
printf("func_B_ctr1_args: 0x%lx\n", (unsigned long) func_B_ctr1_args);
//CHECK: func_B_ctr1_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1015,8 +1016,8 @@ func_B_ctr1_proto->print(llvm::errs());
//CHECK-NEXT: B() : m_B_i(0), m_B_d(0.), m_B_ip(0) {
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_ctr2_args = lookup.findFunctionArgs(class_B, "B", "0,0.0");
const clang::FunctionDecl* func_B_ctr2_proto = lookup.findFunctionProto(class_B, "B", "int,double");
const clang::FunctionDecl* func_B_ctr2_args = lookup.findFunctionArgs(class_B, "B", "0,0.0", diags);
const clang::FunctionDecl* func_B_ctr2_proto = lookup.findFunctionProto(class_B, "B", "int,double", diags);
printf("func_B_ctr2_args: 0x%lx\n", (unsigned long) func_B_ctr2_args);
//CHECK: func_B_ctr2_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1033,8 +1034,8 @@ func_B_ctr2_proto->print(llvm::errs());
//CHECK-NEXT: }
B* force_B_char_ctr = new B('a');
const clang::FunctionDecl* func_B_ctr3_args = lookup.findFunctionArgs(class_B, "B", "'a'");
const clang::FunctionDecl* func_B_ctr3_proto = lookup.findFunctionProto(class_B, "B", "char");
const clang::FunctionDecl* func_B_ctr3_args = lookup.findFunctionArgs(class_B, "B", "'a'", diags);
const clang::FunctionDecl* func_B_ctr3_proto = lookup.findFunctionProto(class_B, "B", "char", diags);
dumpDecl("func_B_ctr3_args", func_B_ctr3_args);
//CHECK: func_B_ctr3_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1051,8 +1052,8 @@ dumpDecl("func_B_ctr3_proto", func_B_ctr3_proto);
//CHECK-NEXT: }
B* force_B_char_ptr_ctr = new B((char*)0);
const clang::FunctionDecl* func_B_ctr4_args = lookup.findFunctionArgs(class_B, "B", "(char*)0");
const clang::FunctionDecl* func_B_ctr4_proto = lookup.findFunctionProto(class_B, "B", "char*");
const clang::FunctionDecl* func_B_ctr4_args = lookup.findFunctionArgs(class_B, "B", "(char*)0", diags);
const clang::FunctionDecl* func_B_ctr4_proto = lookup.findFunctionProto(class_B, "B", "char*", diags);
dumpDecl("func_B_ctr4_args", func_B_ctr4_args);
//CHECK: func_B_ctr4_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1077,8 +1078,8 @@ printf("func_B_ctr4_proto has body: %d\n", func_B_ctr4_proto->hasBody());
// Test finding destructors.
//
const clang::FunctionDecl* func_B_dtr_args = lookup.findFunctionArgs(class_B, "~B", "");
const clang::FunctionDecl* func_B_dtr_proto = lookup.findFunctionProto(class_B, "~B", "");
const clang::FunctionDecl* func_B_dtr_args = lookup.findFunctionArgs(class_B, "~B", "", diags);
const clang::FunctionDecl* func_B_dtr_proto = lookup.findFunctionProto(class_B, "~B", "", diags);
dumpDecl("func_B_dtr_args", func_B_dtr_args);
//CHECK: func_B_dtr_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1102,8 +1103,8 @@ dumpDecl("func_B_dtr_proto", func_B_dtr_proto);
// Test finding free store operator new.
//
const clang::FunctionDecl* func_B_new_args = lookup.findFunctionArgs(class_B, "operator new", "sizeof(B)");
const clang::FunctionDecl* func_B_new_proto = lookup.findFunctionProto(class_B, "operator new", "std::size_t");
const clang::FunctionDecl* func_B_new_args = lookup.findFunctionArgs(class_B, "operator new", "sizeof(B)", diags);
const clang::FunctionDecl* func_B_new_proto = lookup.findFunctionProto(class_B, "operator new", "std::size_t", diags);
dumpDecl("func_B_new_args", func_B_new_args);
//CHECK: func_B_new_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1119,8 +1120,8 @@ dumpDecl("func_B_new_proto", func_B_new_proto);
//CHECK-NEXT: return ::operator new(sz);
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_new_plcmt_args = lookup.findFunctionArgs(class_B, "operator new", "sizeof(B),((B*)&b_arena[0])+2");
const clang::FunctionDecl* func_B_new_plcmt_proto = lookup.findFunctionProto(class_B, "operator new", "std::size_t,void*");
const clang::FunctionDecl* func_B_new_plcmt_args = lookup.findFunctionArgs(class_B, "operator new", "sizeof(B),((B*)&b_arena[0])+2", diags);
const clang::FunctionDecl* func_B_new_plcmt_proto = lookup.findFunctionProto(class_B, "operator new", "std::size_t,void*", diags);
dumpDecl("func_B_new_plcmt_args", func_B_new_plcmt_args);
//CHECK: func_B_new_plcmt_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1136,8 +1137,8 @@ dumpDecl("func_B_new_plcmt_proto", func_B_new_plcmt_proto);
//CHECK-NEXT: return arena;
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_new_ary_args = lookup.findFunctionArgs(class_B, "operator new[]", "sizeof(B)*3");
const clang::FunctionDecl* func_B_new_ary_proto = lookup.findFunctionProto(class_B, "operator new[]", "std::size_t");
const clang::FunctionDecl* func_B_new_ary_args = lookup.findFunctionArgs(class_B, "operator new[]", "sizeof(B)*3", diags);
const clang::FunctionDecl* func_B_new_ary_proto = lookup.findFunctionProto(class_B, "operator new[]", "std::size_t", diags);
dumpDecl("func_B_new_ary_args", func_B_new_ary_args);
//CHECK: func_B_new_ary_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1153,8 +1154,8 @@ dumpDecl("func_B_new_ary_proto", func_B_new_ary_proto);
//CHECK-NEXT: return ::operator new[](sz);
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_new_ary_plcmt_args = lookup.findFunctionArgs(class_B, "operator new[]", "sizeof(B)*3,&b_ary_arena[0]");
const clang::FunctionDecl* func_B_new_ary_plcmt_proto = lookup.findFunctionProto(class_B, "operator new[]", "std::size_t,void*");
const clang::FunctionDecl* func_B_new_ary_plcmt_args = lookup.findFunctionArgs(class_B, "operator new[]", "sizeof(B)*3,&b_ary_arena[0]", diags);
const clang::FunctionDecl* func_B_new_ary_plcmt_proto = lookup.findFunctionProto(class_B, "operator new[]", "std::size_t,void*", diags);
dumpDecl("func_B_new_ary_plcmt_args", func_B_new_ary_plcmt_args);
//CHECK: func_B_new_ary_plcmt_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1174,8 +1175,8 @@ dumpDecl("func_B_new_ary_plcmt_proto", func_B_new_ary_plcmt_proto);
// Test finding free store operator delete.
//
const clang::FunctionDecl* func_B_del_args = lookup.findFunctionArgs(class_B, "operator delete", "b_ptr");
const clang::FunctionDecl* func_B_del_proto = lookup.findFunctionProto(class_B, "operator delete", "void*");
const clang::FunctionDecl* func_B_del_args = lookup.findFunctionArgs(class_B, "operator delete", "b_ptr", diags);
const clang::FunctionDecl* func_B_del_proto = lookup.findFunctionProto(class_B, "operator delete", "void*", diags);
dumpDecl("func_B_del_args", func_B_del_args);
//CHECK: func_B_del_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1191,8 +1192,8 @@ dumpDecl("func_B_del_proto", func_B_del_proto);
//CHECK-NEXT: ::operator delete(vp);
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_del_plcmt_args = lookup.findFunctionArgs(class_B, "operator delete", "((B*)&b_arena[0])+2,&b_arena[0]");
const clang::FunctionDecl* func_B_del_plcmt_proto = lookup.findFunctionProto(class_B, "operator delete", "void*,void*");
const clang::FunctionDecl* func_B_del_plcmt_args = lookup.findFunctionArgs(class_B, "operator delete", "((B*)&b_arena[0])+2,&b_arena[0]", diags);
const clang::FunctionDecl* func_B_del_plcmt_proto = lookup.findFunctionProto(class_B, "operator delete", "void*,void*", diags);
dumpDecl("func_B_del_plcmt_args", func_B_del_plcmt_args);
//CHECK: func_B_del_plcmt_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1206,8 +1207,8 @@ dumpDecl("func_B_del_plcmt_proto", func_B_del_plcmt_proto);
//CHECK-NEXT: void operator delete(void *vp, void *arena) {
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_del_ary_args = lookup.findFunctionArgs(class_B, "operator delete[]", "b_ary");
const clang::FunctionDecl* func_B_del_ary_proto = lookup.findFunctionProto(class_B, "operator delete[]", "void*");
const clang::FunctionDecl* func_B_del_ary_args = lookup.findFunctionArgs(class_B, "operator delete[]", "b_ary", diags);
const clang::FunctionDecl* func_B_del_ary_proto = lookup.findFunctionProto(class_B, "operator delete[]", "void*", diags);
dumpDecl("func_B_del_ary_args", func_B_del_ary_args);
//CHECK: func_B_del_ary_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1223,8 +1224,8 @@ dumpDecl("func_B_del_ary_proto", func_B_del_ary_proto);
//CHECK-NEXT: ::operator delete[](vp);
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_del_ary_plcmt_args = lookup.findFunctionArgs(class_B, "operator delete[]", "(B*)b_arena[3],&b_arena[0]");
const clang::FunctionDecl* func_B_del_ary_plcmt_proto = lookup.findFunctionProto(class_B, "operator delete[]", "void*,void*");
const clang::FunctionDecl* func_B_del_ary_plcmt_args = lookup.findFunctionArgs(class_B, "operator delete[]", "(B*)b_arena,&b_arena[0]", diags);
const clang::FunctionDecl* func_B_del_ary_plcmt_proto = lookup.findFunctionProto(class_B, "operator delete[]", "void*,void*", diags);
dumpDecl("func_B_del_ary_plcmt_args", func_B_del_ary_plcmt_args);
//CHECK: func_B_del_ary_plcmt_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1244,8 +1245,8 @@ dumpDecl("func_B_del_ary_plcmt_proto", func_B_del_ary_plcmt_proto);
// Test finding unary member operator.
//
const clang::FunctionDecl* func_B_star_args = lookup.findFunctionArgs(class_B, "operator*", "");
const clang::FunctionDecl* func_B_star_proto = lookup.findFunctionProto(class_B, "operator*", "");
const clang::FunctionDecl* func_B_star_args = lookup.findFunctionArgs(class_B, "operator*", "", diags);
const clang::FunctionDecl* func_B_star_proto = lookup.findFunctionProto(class_B, "operator*", "", diags);
dumpDecl("func_B_star_args", func_B_star_args);
//CHECK: func_B_star_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1267,8 +1268,8 @@ dumpDecl("func_B_star_proto", func_B_star_proto);
// Test finding binary member operator.
//
const clang::FunctionDecl* func_B_plus_args = lookup.findFunctionArgs(class_B, "operator+", "b_obj");
const clang::FunctionDecl* func_B_plus_proto = lookup.findFunctionProto(class_B, "operator+", "B");
const clang::FunctionDecl* func_B_plus_args = lookup.findFunctionArgs(class_B, "operator+", "b_obj", diags);
const clang::FunctionDecl* func_B_plus_proto = lookup.findFunctionProto(class_B, "operator+", "B", diags);
dumpDecl("func_B_plus_args", func_B_plus_args);
//CHECK: func_B_plus_args: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1289,7 +1290,7 @@ dumpDecl("func_B_plus_proto", func_B_plus_proto);
// from just the name.
//
const clang::FunctionDecl* func_B_j_name = lookup.findAnyFunction(class_A, "B_j");
const clang::FunctionDecl* func_B_j_name = lookup.findAnyFunction(class_A, "B_j", diags);
printf("func_B_j_name: 0x%lx\n", (unsigned long) func_B_j_name);
//CHECK: func_B_j_name: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1299,7 +1300,7 @@ func_B_j_name->print(llvm::errs());
//CHECK-NEXT: int y = vj;
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_k1_name = lookup.findAnyFunction(class_A, "B_k<float>");
const clang::FunctionDecl* func_B_k1_name = lookup.findAnyFunction(class_A, "B_k<float>", diags);
printf("func_B_k1_name: 0x%lx\n", (unsigned long) func_B_k1_name);
//CHECK: func_B_k1_name: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1308,7 +1309,7 @@ func_B_k1_name->print(llvm::errs());
//CHECK-NEXT: float x = v;
//CHECK-NEXT: }
const clang::FunctionDecl* func_B_k1_name_2 = lookup.findAnyFunction(class_A, "B_k");
const clang::FunctionDecl* func_B_k1_name_2 = lookup.findAnyFunction(class_A, "B_k", diags);
printf("func_B_k1_name_2: 0x%lx\n", (unsigned long) func_B_k1_name_2);
//CHECK: func_B_k1_name_2: 0x{{[1-9a-f][0-9a-f]*$}}
@ -1317,7 +1318,7 @@ func_B_k1_name_2->print(llvm::errs());
//CHECK-NEXT: int x = v;
//CHECK-NEXT: }
const clang::FunctionTemplateDecl* func_B_k_template = lookup.findFunctionTemplate(class_A, "B_k");
const clang::FunctionTemplateDecl* func_B_k_template = lookup.findFunctionTemplate(class_A, "B_k", diags);
printf("func_B_k_template: 0x%lx\n", (unsigned long) func_B_k_template);
//CHECK: func_B_k_template: 0x{{[1-9a-f][0-9a-f]*$}}

View File

@ -18,14 +18,16 @@
using namespace std;
using namespace llvm;
using namespace cling;
.rawInput 1
class A {};
.rawInput 0
const cling::LookupHelper& lookup = gCling->getLookupHelper();
const clang::Decl* cl_A = lookup.findScope("A");
const LookupHelper& lookup = gCling->getLookupHelper();
LookupHelper::DiagSetting diags = LookupHelper::WithDiagnostics;
const clang::Decl* cl_A = lookup.findScope("A", diags);
printf("cl_A: 0x%lx\n", (unsigned long) cl_A);
//CHECK: cl_A: 0x{{[1-9a-f][0-9a-f]*$}}
cast<clang::NamedDecl>(cl_A)->getQualifiedNameAsString().c_str()
@ -38,7 +40,7 @@ class A {};
.rawInput 0
const clang::Decl* cl_A_in_N = lookup.findScope("N::A");
const clang::Decl* cl_A_in_N = lookup.findScope("N::A", diags);
printf("cl_A_in_N: 0x%lx\n", (unsigned long) cl_A_in_N);
//CHECK: cl_A_in_N: 0x{{[1-9a-f][0-9a-f]*$}}
cast<clang::NamedDecl>(cl_A_in_N)->getQualifiedNameAsString().c_str()
@ -55,7 +57,7 @@ class A {};
}
.rawInput 0
const clang::Decl* cl_A_in_NMP = lookup.findScope("N::M::P::A");
const clang::Decl* cl_A_in_NMP = lookup.findScope("N::M::P::A", diags);
cl_A_in_NMP
//CHECK: (const clang::Decl *) 0x{{[1-9a-f][0-9a-f]*$}}
cast<clang::NamedDecl>(cl_A_in_NMP)->getQualifiedNameAsString().c_str()
@ -66,7 +68,7 @@ cast<clang::NamedDecl>(cl_A_in_NMP)->getQualifiedNameAsString().c_str()
template <class T> class B { T b; };
.rawInput 0
const clang::Decl* cl_B_int = lookup.findScope("B<int>");
const clang::Decl* cl_B_int = lookup.findScope("B<int>", diags);
printf("cl_B_int: 0x%lx\n", (unsigned long) cl_B_int);
//CHECK-NEXT: cl_B_int: 0x{{[1-9a-f][0-9a-f]*$}}
@ -83,8 +85,8 @@ template <typename T> struct W { T member; };
.rawInput 0
const clang::Type* resType = 0;
lookup.findScope("W<Int_t>", &resType);
//resType->dump();
lookup.findScope("W<Int_t>", diags, &resType);
//resType->dump();
clang::QualType(resType,0).getAsString().c_str()
//CHECK-NEXT: ({{const char [*]|const_pointer}}) "W<Int_t>"

View File

@ -30,9 +30,10 @@ template <typename T> class TmpltOutside {};
.rawInput 0
const cling::LookupHelper& lookup = gCling->getLookupHelper();
cling::LookupHelper::DiagSetting diags = cling::LookupHelper::WithDiagnostics;
const clang::ClassTemplateDecl* tmplt_out = lookup.findClassTemplate("TmpltOutside");
const clang::ClassTemplateDecl* tmplt_out = lookup.findClassTemplate("TmpltOutside", diags);
printf("tmplt_out: 0x%lx\n", (unsigned long) tmplt_out);
//CHECK: tmplt_out: 0x{{[1-9a-f][0-9a-f]*$}}
@ -40,7 +41,7 @@ tmplt_out->getQualifiedNameAsString().c_str()
//CHECK-NEXT: ({{const char [*]|const_pointer}}) "TmpltOutside"
const clang::ClassTemplateDecl* tmplt_inside = lookup.findClassTemplate("OuterClass::TmpltInside");
const clang::ClassTemplateDecl* tmplt_inside = lookup.findClassTemplate("OuterClass::TmpltInside", diags);
printf("tmplt_inside: 0x%lx\n", (unsigned long) tmplt_out);
//CHECK: tmplt_inside: 0x{{[1-9a-f][0-9a-f]*$}}
@ -48,7 +49,7 @@ tmplt_inside->getQualifiedNameAsString().c_str()
//CHECK-NEXT: ({{const char [*]|const_pointer}}) "OuterClass::TmpltInside"
const clang::ClassTemplateDecl* tmplt_vec = lookup.findClassTemplate("std::vector");
const clang::ClassTemplateDecl* tmplt_vec = lookup.findClassTemplate("std::vector", diags);
printf("tmplt_vec: 0x%lx\n", (unsigned long) tmplt_vec);
//CHECK: tmplt_vec: 0x{{[1-9a-f][0-9a-f]*$}}

View File

@ -28,28 +28,30 @@ class C {};
} // namespace M
} // namespace N
typedef int my_int;
using clang::QualType;
using cling::LookupHelper;
.rawInput 0
const cling::LookupHelper& lookup = gCling->getLookupHelper();
const LookupHelper& lookup = gCling->getLookupHelper();
clang::QualType cl_A = lookup.findType("A");
QualType cl_A = lookup.findType("A", LookupHelper::WithDiagnostics);
cl_A.getAsString().c_str()
//CHECK: ({{const char [*]|const_pointer}}) "class A"
clang::QualType cl_B_in_N = lookup.findType("N::B");
QualType cl_B_in_N = lookup.findType("N::B", LookupHelper::WithDiagnostics);
cl_B_in_N.getAsString().c_str()
//CHECK: ({{const char [*]|const_pointer}}) "N::B"
clang::QualType cl_C_in_M = lookup.findType("N::M::C");
QualType cl_C_in_M = lookup.findType("N::M::C", LookupHelper::WithDiagnostics);
cl_C_in_M.getAsString().c_str()
//CHECK: ({{const char [*]|const_pointer}}) "N::M::C"
clang::QualType builtin_int = lookup.findType("int");
QualType builtin_int = lookup.findType("int", LookupHelper::WithDiagnostics);
builtin_int.getAsString().c_str()
//CHECK: ({{const char [*]|const_pointer}}) "int"
clang::QualType typedef_my_int = lookup.findType("my_int");
QualType typedef_my_int = lookup.findType("my_int", LookupHelper::WithDiagnostics);
typedef_my_int.getAsString().c_str()
//CHECK: ({{const char [*]|const_pointer}}) "my_int"

View File

@ -131,13 +131,14 @@ namespace NS1 {
.rawInput 0
const cling::LookupHelper& lookup = gCling->getLookupHelper();
cling::LookupHelper::DiagSetting diags = cling::LookupHelper::WithDiagnostics;
const clang::ASTContext& Ctx = gCling->getSema().getASTContext();
cling::utils::Transform::Config transConfig;
transConfig.m_toSkip.insert(lookup.findType("Double32_t").getTypePtr());
transConfig.m_toSkip.insert(lookup.findType("Double32_t", diags).getTypePtr());
using namespace std;
transConfig.m_toSkip.insert(lookup.findType("string").getTypePtr());
transConfig.m_toSkip.insert(lookup.findType("std::string").getTypePtr());
transConfig.m_toSkip.insert(lookup.findType("string", diags).getTypePtr());
transConfig.m_toSkip.insert(lookup.findType("std::string", diags).getTypePtr());
const clang::Type* t = 0;
const clang::TypedefType *td = 0;
@ -145,14 +146,14 @@ clang::QualType QT;
using namespace cling::utils;
// Test the behavior on a simple class
lookup.findScope("Details::Impl", &t);
lookup.findScope("Details::Impl", diags, &t);
QT = clang::QualType(t, 0);
//QT.getAsString().c_str()
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "Details::Impl"
// Test the behavior for a class inside an anonymous namespace
lookup.findScope("InsideAnonymous", &t);
lookup.findScope("InsideAnonymous", diags, &t);
QT = clang::QualType(t, 0);
//QT.getAsString().c_str()c
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
@ -172,25 +173,25 @@ name.c_str()
// CHECK: ({{const char [*]|const_pointer}}) "InsideAnonymous"
// Test desugaring pointers types:
QT = lookup.findType("Int_t*");
QT = lookup.findType("Int_t*", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK:({{const char [*]|const_pointer}}) "int *"
QT = lookup.findType("const IntPtr_t*");
QT = lookup.findType("const IntPtr_t*", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK:({{const char [*]|const_pointer}}) "int *const *"
// Test desugaring reference (both r- or l- value) types:
QT = lookup.findType("const IntPtr_t&");
QT = lookup.findType("const IntPtr_t&", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK:({{const char [*]|const_pointer}}) "int *const &"
//TODO: QT = lookup.findType("IntPtr_t[32]");
//TODO: QT = lookup.findType("IntPtr_t[32], diags");
// To do: findType does not return the const below:
// Test desugaring reference (both r- or l- value) types:
// QT = lookup.findType("const IntRef_t");
// QT = lookup.findType("const IntRef_t", diags);
// Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// should print:({{const char [*]|const_pointer}}) "int &const"
// but this is actually an illegal type:
@ -203,126 +204,126 @@ Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// So the following is the right behavior:
QT = lookup.findType("const IntRef_t");
QT = lookup.findType("const IntRef_t", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "int &"
// Test desugaring reference (both r- or l- value) types:
QT = lookup.findType("IntRef_t");
QT = lookup.findType("IntRef_t", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK:({{const char [*]|const_pointer}}) "int &"
//Desugar template parameters:
lookup.findScope("A<B<Double32_t, Int_t*> >", &t);
lookup.findScope("A<B<Double32_t, Int_t*> >", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK:({{const char [*]|const_pointer}}) "A<B<Double32_t, int *> >"
lookup.findScope("A<B<Double32_t, std::size_t*> >", &t);
lookup.findScope("A<B<Double32_t, std::size_t*> >", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK:({{const char [*]|const_pointer}}) "A<B<Double32_t, unsigned {{long|int}} *> >"
lookup.findScope("CTD", &t);
lookup.findScope("CTD", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "C<A<B<Double32_t, int> >, Double32_t>"
lookup.findScope("CTDConst", &t);
lookup.findScope("CTDConst", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "C<A<B<const Double32_t, const int> >, Double32_t>"
lookup.findScope("std::pair<const std::string,int>", &t);
lookup.findScope("std::pair<const std::string,int>", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "std::pair<const std::string, int>"
lookup.findScope("NS::Array<NS::ArrayType<double> >", &t);
lookup.findScope("NS::Array<NS::ArrayType<double> >", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::Array<NS::ArrayType<double> >"
lookup.findScope("NS::Array<NS::ArrayType<Double32_t> >", &t);
lookup.findScope("NS::Array<NS::ArrayType<Double32_t> >", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::Array<NS::ArrayType<Double32_t> >"
lookup.findScope("NS::Container<Long_t>::Content", &t);
lookup.findScope("NS::Container<Long_t>::Content", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::Container<long>::Content"
QT = lookup.findType("NS::Container<Long_t>::Value_t");
QT = lookup.findType("NS::Container<Long_t>::Value_t", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "long"
lookup.findScope("NS::Container<Long_t>::Content_t", &t);
lookup.findScope("NS::Container<Long_t>::Content_t", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::Container<long>::Content"
lookup.findScope("NS::Container<Long_t>::Impl_t", &t);
lookup.findScope("NS::Container<Long_t>::Impl_t", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "Details::Impl"
lookup.findScope("NS::Container<Double32_t>::Content", &t);
lookup.findScope("NS::Container<Double32_t>::Content", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::Container<Double32_t>::Content"
QT = lookup.findType("NS::Container<Double32_t>::Value_t");
QT = lookup.findType("NS::Container<Double32_t>::Value_t", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "double"
// Really we would want it to say Double32_t but oh well.
lookup.findScope("NS::Container<Double32_t>::Content_t", &t);
lookup.findScope("NS::Container<Double32_t>::Content_t", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::Container<Double32_t>::Content"
lookup.findScope("NS::Container<Double32_t>::Impl_t", &t);
lookup.findScope("NS::Container<Double32_t>::Impl_t", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "Details::Impl"
lookup.findScope("NS::TDataPointF", &t);
lookup.findScope("NS::TDataPointF", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::TDataPoint<float>"
lookup.findScope("NS::TDataPointD32", &t);
lookup.findScope("NS::TDataPointD32", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::TDataPoint<Double32_t>"
lookup.findScope("NS::ArrayType<float,1>", &t);
lookup.findScope("NS::ArrayType<float,1>", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::ArrayType<float, 1>"
lookup.findScope("NS::FArray", &t);
lookup.findScope("NS::FArray", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "NS::ArrayType<float, 2>"
QT = lookup.findType("const NS::IntNS_t");
QT = lookup.findType("const NS::IntNS_t", diags);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "const int"
lookup.findScope("vector<Details::Impl>::value_type", &t);
lookup.findScope("vector<Details::Impl>::value_type", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "Details::Impl"
lookup.findScope("vector<Details::Impl>::iterator", &t);
lookup.findScope("vector<Details::Impl>::iterator", diags, &t);
QT = clang::QualType(t, 0);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "std::vector<Details::Impl>::iterator"
lookup.findScope("vector<Details::Impl>::const_iterator", &t);
lookup.findScope("vector<Details::Impl>::const_iterator", diags, &t);
QT = clang::QualType(t, 0);
td = QT->getAs<clang::TypedefType>();
clang::TypedefNameDecl *tdDecl = td->getDecl();
@ -330,7 +331,7 @@ QT = Ctx.getTypedefType(tdDecl);
Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig, true).getAsString().c_str()
// CHECK: ({{const char [*]|const_pointer}}) "std::vector<Details::Impl, std::allocator<Details::Impl> >::const_iterator"
const clang::Decl*decl=lookup.findScope("Embedded_objects",&t);
const clang::Decl*decl=lookup.findScope("Embedded_objects", diags,&t);
if (decl) {
const clang::CXXRecordDecl *cxxdecl
= llvm::dyn_cast<clang::CXXRecordDecl>(decl);
@ -362,7 +363,7 @@ if (decl) {
// In the partial desugaring add support for the case where we have a type
// that point to an already completely desugared template instantiation in
// which case the type is a RecordDecl rather than a TemplateInstantationType
decl = lookup.findScope("std::pair<Details::Impl,std::vector<Details::Impl> >",&t);
decl = lookup.findScope("std::pair<Details::Impl,std::vector<Details::Impl> >", diags,&t);
QT = clang::QualType(t, 0);
std::cout << Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str() << std::endl;
// CHECK: std::pair<Details::Impl, std::vector<Details::Impl> >
@ -386,7 +387,7 @@ if (const clang::RecordDecl *rdecl = llvm::dyn_cast_or_null<clang::RecordDecl>(d
// CHECK: std::vector<Details::Impl, std::allocator<Details::Impl> >
decl=lookup.findScope("NS1::NS2::NS3::Inner3",&t);
decl=lookup.findScope("NS1::NS2::NS3::Inner3", diags,&t);
if (decl) {
const clang::CXXRecordDecl *cxxdecl
= llvm::dyn_cast<clang::CXXRecordDecl>(decl);
@ -408,7 +409,7 @@ if (decl) {
// CHECK: NS1::NS2::NS3::Point
// CHECK: NS1::NS2::NS3::Point
decl = lookup.findScope("cmap<volatile int,volatile int>",&t);
decl = lookup.findScope("cmap<volatile int,volatile int>", diags,&t);
QT = clang::QualType(t, 0);
std::cout << Transform::GetPartiallyDesugaredType(Ctx, QT, transConfig).getAsString().c_str() << std::endl;
if (const clang::RecordDecl *rdecl = llvm::dyn_cast_or_null<clang::RecordDecl>(decl)) {