r349086 - Attempt to fix code completion test to handle LLP64 platforms
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 13 13:41:08 PST 2018
Author: rnk
Date: Thu Dec 13 13:41:07 2018
New Revision: 349086
URL: http://llvm.org/viewvc/llvm-project?rev=349086&view=rev
Log:
Attempt to fix code completion test to handle LLP64 platforms
Modified:
cfe/trunk/unittests/Sema/CodeCompleteTest.cpp
Modified: cfe/trunk/unittests/Sema/CodeCompleteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/CodeCompleteTest.cpp?rev=349086&r1=349085&r2=349086&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/CodeCompleteTest.cpp (original)
+++ cfe/trunk/unittests/Sema/CodeCompleteTest.cpp Thu Dec 13 13:41:07 2018
@@ -213,7 +213,9 @@ TEST(PreferredTypeTest, BinaryExpr) {
ptr += ^10;
ptr -= ^10;
})cpp";
- EXPECT_THAT(collectPreferredTypes(Code), Each("long")); // long is normalized 'ptrdiff_t'.
+ // Expect the normalized ptrdiff_t type, which is typically long or long long.
+ const char *PtrDiff = sizeof(void *) == sizeof(long) ? "long" : "long long";
+ EXPECT_THAT(collectPreferredTypes(Code), Each(PtrDiff));
// Comparison operators.
Code = R"cpp(
More information about the cfe-commits
mailing list