Attempt to fix some MSVC build errors.

llvm-svn: 339587
This commit is contained in:
Erik Pilkington 2018-08-13 17:39:19 +00:00
parent 8ed38f2e80
commit 9e4e2a2c72
1 changed files with 3 additions and 3 deletions

View File

@ -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.
}