forked from OSchip/llvm-project
parent
8ed38f2e80
commit
9e4e2a2c72
|
@ -16,7 +16,7 @@ TEST(FindTypesInMangledNameTest, Test) {
|
|||
std::vector<const char *> Types;
|
||||
const char *Mangled = "_Z1fiv";
|
||||
EXPECT_FALSE(llvm::itaniumFindTypesInMangledName(
|
||||
Mangled, static_cast<void *>(&Types), +[](void *Ty, const char *P) {
|
||||
Mangled, static_cast<void *>(&Types), [](void *Ty, const char *P) {
|
||||
static_cast<std::vector<const char *> *>(Ty)->push_back(P);
|
||||
}));
|
||||
EXPECT_EQ(Types.size(), size_t(2));
|
||||
|
@ -24,11 +24,11 @@ TEST(FindTypesInMangledNameTest, Test) {
|
|||
EXPECT_EQ(Mangled + 5, Types.back());
|
||||
|
||||
EXPECT_TRUE(llvm::itaniumFindTypesInMangledName(
|
||||
"Not a mangled name!", nullptr, +[](void *, const char *) {}));
|
||||
"Not a mangled name!", nullptr, [](void *, const char *) {}));
|
||||
|
||||
int TC = 0;
|
||||
EXPECT_FALSE(llvm::itaniumFindTypesInMangledName(
|
||||
"_Z1fPRic", static_cast<void *>(&TC),
|
||||
+[](void *Ctx, const char *) { ++*static_cast<int *>(Ctx); }));
|
||||
[](void *Ctx, const char *) { ++*static_cast<int *>(Ctx); }));
|
||||
EXPECT_EQ(TC, 4); // pointer, reference, int, char.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue