Author: gribozavr
Date: Fri Aug 17 19:41:04 2012
New Revision: 162158

URL: http://llvm.org/viewvc/llvm-project?rev=162158&view=rev
Log:
AST Matchers tests: test that member() matches member allocation functions:
declare size_t in system-independent way.

Modified:
    cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp

Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp?rev=162158&r1=162157&r2=162158&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp Fri Aug 17 19:41:04 2012
@@ -2014,14 +2014,14 @@
 }
 
 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")))));
 }


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to