Tweak an _MSC_VER ifdef to use typename with clang in a unittest
authorReid Kleckner <reid@kleckner.net>
Thu, 13 Feb 2014 19:51:13 +0000 (19:51 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 13 Feb 2014 19:51:13 +0000 (19:51 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201358 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/DenseMapTest.cpp

index 15eb6988f669058154407df6f4402b64b015340d..fa5d0f2e9eae7560436ee75ab77d599d9c0d78b7 100644 (file)
@@ -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