Set the access specifier for using decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80435 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index accbcd1..f3d202c 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1750,6 +1750,7 @@
                                    bool IsTypeName);
   
   virtual DeclPtrTy ActOnUsingDeclaration(Scope *CurScope,
+                                          AccessSpecifier AS,
                                           SourceLocation UsingLoc,
                                           const CXXScopeSpec &SS,
                                           SourceLocation IdentLoc,
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 4c4dd41..6d32f3f 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -2094,6 +2094,7 @@
 
 
 Sema::DeclPtrTy Sema::ActOnUsingDeclaration(Scope *S,
+                                            AccessSpecifier AS,
                                             SourceLocation UsingLoc,
                                             const CXXScopeSpec &SS,
                                             SourceLocation IdentLoc,
@@ -2112,8 +2113,10 @@
   
   NamedDecl *UD = BuildUsingDeclaration(UsingLoc, SS, IdentLoc, 
                                         Name, AttrList, IsTypeName);
-  if (UD)
+  if (UD) {
     PushOnScopeChains(UD, S);
+    UD->setAccess(AS);
+  }
   
   return DeclPtrTy::make(UD);
 }