Index: docs/LanguageExtensions.html
==================================================================
--- docs/LanguageExtensions.html
+++ docs/LanguageExtensions.html
@@ -1005,10 +1005,11 @@
   <li><code>__is_base_of</code> (GNU, Microsoft)</li>
   <li><code>__is_class</code> (GNU, Microsoft)</li>
   <li><code>__is_convertible_to</code> (Microsoft)</li>
   <li><code>__is_empty</code> (GNU, Microsoft)</li>
   <li><code>__is_enum</code> (GNU, Microsoft)</li>
+  <li><code>__is_interface_class</code> (Microsoft)</li>
   <li><code>__is_pod</code> (GNU, Microsoft)</li>
   <li><code>__is_polymorphic</code> (GNU, Microsoft)</li>
   <li><code>__is_union</code> (GNU, Microsoft)</li>
   <li><code>__is_literal(type)</code>: Determines whether the given type is a literal type</li>
   <li><code>__is_final</code>: Determines whether the given type is declared with a <code>final</code> class-virt-specifier.</li>

Index: include/clang/Basic/TokenKinds.def
==================================================================
--- include/clang/Basic/TokenKinds.def
+++ include/clang/Basic/TokenKinds.def
@@ -363,10 +363,11 @@
 KEYWORD(__is_class                  , KEYCXX)
 KEYWORD(__is_convertible_to         , KEYCXX)
 KEYWORD(__is_empty                  , KEYCXX)
 KEYWORD(__is_enum                   , KEYCXX)
 KEYWORD(__is_final                  , KEYCXX)
+KEYWORD(__is_interface_class        , KEYCXX)
 // Tentative name - there's no implementation of std::is_literal_type yet.
 KEYWORD(__is_literal                , KEYCXX)
 // Name for GCC 4.6 compatibility - people have already written libraries using
 // this name unfortunately.
 KEYWORD(__is_literal_type           , KEYCXX)

Index: include/clang/Basic/TypeTraits.h
==================================================================
--- include/clang/Basic/TypeTraits.h
+++ include/clang/Basic/TypeTraits.h
@@ -39,10 +39,11 @@
     UTT_IsFinal,
     UTT_IsFloatingPoint,
     UTT_IsFunction,
     UTT_IsFundamental,
     UTT_IsIntegral,
+    UTT_IsInterfaceClass,
     UTT_IsLiteral,
     UTT_IsLvalueReference,
     UTT_IsMemberFunctionPointer,
     UTT_IsMemberObjectPointer,
     UTT_IsMemberPointer,

Index: lib/AST/StmtPrinter.cpp
==================================================================
--- lib/AST/StmtPrinter.cpp
+++ lib/AST/StmtPrinter.cpp
@@ -1529,10 +1529,11 @@
   case UTT_IsFinal:                 return "__is_final";
   case UTT_IsFloatingPoint:         return "__is_floating_point";
   case UTT_IsFunction:              return "__is_function";
   case UTT_IsFundamental:           return "__is_fundamental";
   case UTT_IsIntegral:              return "__is_integral";
+  case UTT_IsInterfaceClass:        return "__is_interface_class";
   case UTT_IsLiteral:               return "__is_literal";
   case UTT_IsLvalueReference:       return "__is_lvalue_reference";
   case UTT_IsMemberFunctionPointer: return "__is_member_function_pointer";
   case UTT_IsMemberObjectPointer:   return "__is_member_object_pointer";
   case UTT_IsMemberPointer:         return "__is_member_pointer";

Index: lib/Parse/ParseExpr.cpp
==================================================================
--- lib/Parse/ParseExpr.cpp
+++ lib/Parse/ParseExpr.cpp
@@ -1184,10 +1184,11 @@
 
   case tok::kw___is_abstract: // [GNU] unary-type-trait
   case tok::kw___is_class:
   case tok::kw___is_empty:
   case tok::kw___is_enum:
+  case tok::kw___is_interface_class:
   case tok::kw___is_literal:
   case tok::kw___is_arithmetic:
   case tok::kw___is_integral:
   case tok::kw___is_floating_point:
   case tok::kw___is_complete_type:

Index: lib/Parse/ParseExprCXX.cpp
==================================================================
--- lib/Parse/ParseExprCXX.cpp
+++ lib/Parse/ParseExprCXX.cpp
@@ -2455,10 +2455,11 @@
   case tok::kw___is_final:                 return UTT_IsFinal;
   case tok::kw___is_floating_point:          return UTT_IsFloatingPoint;
   case tok::kw___is_function:                return UTT_IsFunction;
   case tok::kw___is_fundamental:             return UTT_IsFundamental;
   case tok::kw___is_integral:                return UTT_IsIntegral;
+  case tok::kw___is_interface_class:         return UTT_IsInterfaceClass;
   case tok::kw___is_lvalue_reference:        return UTT_IsLvalueReference;
   case tok::kw___is_member_function_pointer: return UTT_IsMemberFunctionPointer;
   case tok::kw___is_member_object_pointer:   return UTT_IsMemberObjectPointer;
   case tok::kw___is_member_pointer:          return UTT_IsMemberPointer;
   case tok::kw___is_object:                  return UTT_IsObject;

Index: lib/Parse/ParseTentative.cpp
==================================================================
--- lib/Parse/ParseTentative.cpp
+++ lib/Parse/ParseTentative.cpp
@@ -780,10 +780,11 @@
   case tok::kw___is_base_of:
   case tok::kw___is_class:
   case tok::kw___is_convertible_to:
   case tok::kw___is_empty:
   case tok::kw___is_enum:
+  case tok::kw___is_interface_class:
   case tok::kw___is_final:
   case tok::kw___is_literal:
   case tok::kw___is_literal_type:
   case tok::kw___is_pod:
   case tok::kw___is_polymorphic:

Index: lib/Sema/SemaExprCXX.cpp
==================================================================
--- lib/Sema/SemaExprCXX.cpp
+++ lib/Sema/SemaExprCXX.cpp
@@ -2932,10 +2932,11 @@
   case UTT_IsPOD:
   case UTT_IsLiteral:
   case UTT_IsEmpty:
   case UTT_IsPolymorphic:
   case UTT_IsAbstract:
+  case UTT_IsInterfaceClass:
     // Fall-through
 
   // These traits require a complete type.
   case UTT_IsFinal:
 
@@ -3062,10 +3063,14 @@
     return false;
   case UTT_IsAbstract:
     if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
       return RD->isAbstract();
     return false;
+  case UTT_IsInterfaceClass:
+    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
+      return RD->isInterface();
+    return false;
   case UTT_IsFinal:
     if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
       return RD->hasAttr<FinalAttr>();
     return false;
   case UTT_IsSigned:

Index: test/SemaCXX/ms-interface.cpp
==================================================================
--- test/SemaCXX/ms-interface.cpp
+++ test/SemaCXX/ms-interface.cpp
@@ -61,10 +61,14 @@
 };
 
 struct S { };
 class C { };
 __interface I { };
+
+static_assert(!__is_interface_class(S), "oops");
+static_assert(!__is_interface_class(C), "oops");
+static_assert(__is_interface_class(I), "oops");
 
 // expected-error@55 {{interface type cannot inherit from 'struct S'}}
 // expected-note@+1 {{in instantiation of template class 'I6<S>' requested here}}
 struct S1 : I6<S> {
 };

