From adf36b237996270221b43fcabdabe3dbe87330fd Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 29 Aug 2009 20:47:47 +0000 Subject: Add a workaround for decls that come from friend decls pointing to undeclared classes. llvm-svn: 80438 --- clang/lib/AST/DeclPrinter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/DeclPrinter.cpp') diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 191d356755f..275f2db82b5 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -202,7 +202,10 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { if (PrintAccess) { AccessSpecifier AS = D->getAccess(); - if (AS != CurAS) { + + if (AS != CurAS && + // FIXME: This check shouldn't be necessary. + D->getFriendObjectKind() == Decl::FOK_Undeclared) { Print(AS); Out << ":\n"; CurAS = AS; -- cgit v1.2.3