diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-30 22:16:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-30 22:16:51 +0000 |
commit | 46dd5bba4495c8c331668ae45d676e5ace9ed2d9 (patch) | |
tree | 614998e2b0be62e1da9d073741c41bb3f4f67c32 /clang/lib/AST/Decl.cpp | |
parent | d3aebaf875a3c8d50f973f33a4fa31712291cc82 (diff) | |
download | bcm5719-llvm-46dd5bba4495c8c331668ae45d676e5ace9ed2d9.tar.gz bcm5719-llvm-46dd5bba4495c8c331668ae45d676e5ace9ed2d9.zip |
Take PrintingPolicy::SuppressUnwrittenScope into account when printing the
qualified name of a NamedDecl. Patch by Volodymyr Sapsai!
llvm-svn: 209924
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 1c3a5384d35..5c8041548a0 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1303,6 +1303,9 @@ void NamedDecl::printQualifiedName(raw_ostream &OS, TemplateArgs.size(), P); } else if (const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(*I)) { + if (P.SuppressUnwrittenScope && + (ND->isAnonymousNamespace() || ND->isInline())) + continue; if (ND->isAnonymousNamespace()) OS << "(anonymous namespace)"; else |