зеркало из https://github.com/microsoft/clang-1.git
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:
Родитель
c32a453e40
Коммит
02ed37f95e
|
@ -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")))));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче