diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-05-07 09:09:23 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-05-07 09:09:23 +0000 |
commit | 0b4e3125661301461061282bd6f756202df35bdc (patch) | |
tree | 50d60830bbf014b9b064a94f4a14d09b3f35d9ca /clang/lib/AST/DeclPrinter.cpp | |
parent | 019b5dbc55e32a4596a334305f8d19f8184127f2 (diff) | |
download | bcm5719-llvm-0b4e3125661301461061282bd6f756202df35bdc.tar.gz bcm5719-llvm-0b4e3125661301461061282bd6f756202df35bdc.zip |
Revert 103247, it causes lots of test failures.
llvm-svn: 103248
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 53949247970..609d64cc7e7 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -214,7 +214,11 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { if (PrintAccess) { 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) this->Indent(Indentation - Policy.Indentation); Print(AS); |