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
diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp
index 1ff2e71..858cf12 100644
--- a/lib/AST/NestedNameSpecifier.cpp
+++ b/lib/AST/NestedNameSpecifier.cpp
@@ -229,6 +229,9 @@
     break;
 
   case Namespace:
+    if (getAsNamespace()->isAnonymousNamespace())
+      return;
+      
     OS << getAsNamespace()->getName();
     break;