summaryrefslogtreecommitdiffstats
path: root/lib/AST/NestedNameSpecifier.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-03 00:16:13 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-03 00:16:13 +0000
commit25270b6e6a8416b7532cfe552b41794418ea19b1 (patch)
tree1d251cd907bad2f7d4e825fb4dcd9fbef767ca2c /lib/AST/NestedNameSpecifier.cpp
parentb551dd31f6b15aa959127ee906084fcf5bf0154e (diff)
Add a printing policy flag to suppress printing "<anonymous>::" prior
to types. Enable this flag for code completion, where knowing whether something is in an anonymous or inline namespace is actually not useful, since you don't have to type it anyway. Fixes <rdar://problem/10208818>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/NestedNameSpecifier.cpp')
-rw-r--r--lib/AST/NestedNameSpecifier.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp
index 1ff2e7177b..858cf12dc6 100644
--- a/lib/AST/NestedNameSpecifier.cpp
+++ b/lib/AST/NestedNameSpecifier.cpp
@@ -229,6 +229,9 @@ NestedNameSpecifier::print(raw_ostream &OS,
break;
case Namespace:
+ if (getAsNamespace()->isAnonymousNamespace())
+ return;
+
OS << getAsNamespace()->getName();
break;