Revert 103247, it causes lots of test failures.

llvm-svn: 103248
This commit is contained in:
Sebastian Redl 2010-05-07 09:09:23 +00:00
parent 019b5dbc55
commit 0b4e312566
2 changed files with 6 additions and 2 deletions

View File

@ -214,7 +214,11 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
if (PrintAccess) { if (PrintAccess) {
AccessSpecifier AS = D->getAccess(); AccessSpecifier AS = D->getAccess();
if (AS != CurAS) { // This is a hack: when a struct is declared in a member declaration
// struct outer { struct inner *ptr; }; then we encounter the struct
// decl, but it has no access specifier.
// The correct solution is to merge this with the member.
if (AS != CurAS && AS != AS_none) {
if (Indent) if (Indent)
this->Indent(Indentation - Policy.Indentation); this->Indent(Indentation - Policy.Indentation);
Print(AS); Print(AS);

View File

@ -2670,7 +2670,7 @@ Sema::BuildMemberReferenceExpr(ExprArg BaseArg, QualType BaseType,
return move(Result); return move(Result);
} }
return BuildMemberReferenceExpr(ExprArg(*this, Base), Base->getType(), return BuildMemberReferenceExpr(ExprArg(*this, Base), BaseType,
OpLoc, IsArrow, SS, FirstQualifierInScope, OpLoc, IsArrow, SS, FirstQualifierInScope,
R, TemplateArgs); R, TemplateArgs);
} }