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>.

llvm-svn: 143599
This commit is contained in:
Douglas Gregor
2011-11-03 00:16:13 +00:00
parent 9589872af9
commit 2e10cf9620
5 changed files with 20 additions and 5 deletions

View File

@@ -1381,6 +1381,7 @@ static PrintingPolicy getCompletionPrintingPolicy(Sema &S) {
PrintingPolicy Policy = S.getPrintingPolicy();
Policy.AnonymousTagLocations = false;
Policy.SuppressStrongLifetime = true;
Policy.SuppressUnwrittenScope = true;
return Policy;
}