summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-29 20:47:47 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-29 20:47:47 +0000
commitadf36b237996270221b43fcabdabe3dbe87330fd (patch)
treebe8e7c1790f05dcdbd0a61d59cd297572c2396ca /clang/lib/AST/DeclPrinter.cpp
parent6df9e076ea410d49d73e967b577a40ed50b454e2 (diff)
downloadbcm5719-llvm-adf36b237996270221b43fcabdabe3dbe87330fd.tar.gz
bcm5719-llvm-adf36b237996270221b43fcabdabe3dbe87330fd.zip
Add a workaround for decls that come from friend decls pointing to undeclared classes.
llvm-svn: 80438
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud