diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-08-12 21:54:04 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-08-12 21:54:04 +0000 |
commit | 24b3fed69fd2bb25a0c2d2a62e051f8702e92391 (patch) | |
tree | afd3519febba5747f556fbf4e08764c6ad30db81 /clang/lib/AST/DeclPrinter.cpp | |
parent | e2358c1debe988a9ff262cb267c791c93ee04a4a (diff) | |
download | bcm5719-llvm-24b3fed69fd2bb25a0c2d2a62e051f8702e92391.tar.gz bcm5719-llvm-24b3fed69fd2bb25a0c2d2a62e051f8702e92391.zip |
Fix pretty-printing for unnamed unions.
This is just a couple of minor fixes to account for the existence
of ElaboratedType.
llvm-svn: 188209
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 10ef28828c4..1e2d9d6e084 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -260,6 +260,8 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { QualType CurDeclType = getDeclType(*D); if (!Decls.empty() && !CurDeclType.isNull()) { QualType BaseType = GetBaseType(CurDeclType); + if (!BaseType.isNull() && isa<ElaboratedType>(BaseType)) + BaseType = cast<ElaboratedType>(BaseType)->getNamedType(); if (!BaseType.isNull() && isa<TagType>(BaseType) && cast<TagType>(BaseType)->getDecl() == Decls[0]) { Decls.push_back(*D); |