aboutsummaryrefslogtreecommitdiff
path: root/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
commit35eda446cdf5b4e95a80ffacbf6c7f7478c6d927 (patch)
treed7ff95b5d4f37304da25c757875963c2ffc0d5c8 /lib/AST/DeclPrinter.cpp
parent018e9fead456a6bdcde68dba7cc1aa4a7ee8d639 (diff)
Add a workaround for decls that come from friend decls pointing to undeclared classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r--lib/AST/DeclPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index 191d356755..275f2db82b 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/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;