AST Matchers tests: test that member() matches member allocation functions:

declare size_t in system-independent way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dmitri Gribenko 2012-08-18 00:41:04 +00:00
Родитель c32a453e40
Коммит 02ed37f95e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2014,14 +2014,14 @@ TEST(Member, MatchesInMemberFunctionCall) {
}
TEST(Member, MatchesMemberAllocationFunction) {
EXPECT_TRUE(matches("namespace std { typedef unsigned long size_t; }"
EXPECT_TRUE(matches("namespace std { typedef typeof(sizeof(int)) size_t; }"
"class X { void *operator new(std::size_t); };",
method(ofClass(hasName("X")))));
EXPECT_TRUE(matches("class X { void operator delete(void*); };",
method(ofClass(hasName("X")))));
EXPECT_TRUE(matches("namespace std { typedef unsigned long size_t; }"
EXPECT_TRUE(matches("namespace std { typedef typeof(sizeof(int)) size_t; }"
"class X { void operator delete[](void*, std::size_t); };",
method(ofClass(hasName("X")))));
}