Add Sema support for C++ classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index c84b5e7..87dcdfc 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -229,11 +229,9 @@
 
   // If there is a body, parse it and inform the actions module.
   if (Tok.is(tok::l_brace))
-    // FIXME: Temporarily disable parsing for C++ classes until the Sema support
-    // is in place.
-    //if (getLang().CPlusPlus)
-    //  ParseCXXMemberSpecification(StartLoc, TagType, TagDecl);
-    //else
+    if (getLang().CPlusPlus)
+      ParseCXXMemberSpecification(StartLoc, TagType, TagDecl);
+    else
       ParseStructUnionBody(StartLoc, TagType, TagDecl);
   else if (TK == Action::TK_Definition) {
     // FIXME: Complain that we have a base-specifier list but no
@@ -411,7 +409,7 @@
         return 0;
     }
   }
-  
+
   Declarator DeclaratorInfo(DS, Declarator::MemberContext);
 
   if (Tok.isNot(tok::colon)) {
@@ -492,6 +490,10 @@
     if (Tok.is(tok::kw___attribute))
       DeclaratorInfo.AddAttributes(ParseAttributes());
 
+    // NOTE: If Sema is the Action module and declarator is an instance field,
+    // this call will *not* return the created decl; LastDeclInGroup will be
+    // returned instead.
+    // See Sema::ActOnCXXMemberDeclarator for details.
     LastDeclInGroup = Actions.ActOnCXXMemberDeclarator(CurScope, AS,
                                                        DeclaratorInfo,
                                                        BitfieldSize, Init,