aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-10-24 20:21:25 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-10-24 20:21:25 +0000
commita45451d0959501c7d82582c61571a29cfdacdb0b (patch)
treefa29ea2421d2a53a852f84008cc318a71dbb1615 /lib
parent6c8b6498bed5f378018285c42b367dc2e06a98cd (diff)
Don't print scope qualifiers for references to a type defined locally in a function. Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/TypePrinter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp
index 4cf4b1847f..90b2ca9cce 100644
--- a/lib/AST/TypePrinter.cpp
+++ b/lib/AST/TypePrinter.cpp
@@ -799,6 +799,7 @@ void TypePrinter::printAtomicAfter(const AtomicType *T, raw_ostream &OS) { }
/// Appends the given scope to the end of a string.
void TypePrinter::AppendScope(DeclContext *DC, raw_ostream &OS) {
if (DC->isTranslationUnit()) return;
+ if (DC->isFunctionOrMethod()) return;
AppendScope(DC->getParent(), OS);
if (NamespaceDecl *NS = dyn_cast<NamespaceDecl>(DC)) {