[llvm] r201358 - Tweak an _MSC_VER ifdef to use typename with clang in a unittest
Reid Kleckner
reid at kleckner.net
Thu Feb 13 11:51:13 PST 2014
Author: rnk
Date: Thu Feb 13 13:51:13 2014
New Revision: 201358
URL: http://llvm.org/viewvc/llvm-project?rev=201358&view=rev
Log:
Tweak an _MSC_VER ifdef to use typename with clang in a unittest
In theory, Clang should figure out how to parse this correctly without
typename, but since this is the last TU that Clang falls back on in the
self-host, I'm going to compromise and check for __clang__.
And now Clang can self-host on -win32 without fallback! The 'check' and
'check-clang' targets both pass.
Modified:
llvm/trunk/unittests/ADT/DenseMapTest.cpp
Modified: llvm/trunk/unittests/ADT/DenseMapTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/DenseMapTest.cpp?rev=201358&r1=201357&r2=201358&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/DenseMapTest.cpp (original)
+++ llvm/trunk/unittests/ADT/DenseMapTest.cpp Thu Feb 13 13:51:13 2014
@@ -119,7 +119,7 @@ TYPED_TEST(DenseMapTest, EmptyIntMapTest
// Lookup tests
EXPECT_FALSE(this->Map.count(this->getKey()));
EXPECT_TRUE(this->Map.find(this->getKey()) == this->Map.end());
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) || defined(__clang__)
EXPECT_EQ(typename TypeParam::mapped_type(),
this->Map.lookup(this->getKey()));
#else
More information about the llvm-commits
mailing list