ioeric abandoned this revision.
ioeric marked an inline comment as done.
ioeric added inline comments.


================
Comment at: clangd/CodeComplete.cpp:563
     for (auto *Context : CCContext.getVisitedContexts()) {
-      if (isa<TranslationUnitDecl>(Context))
+      if (isa<TranslationUnitDecl>(Context)) {
         Info.AccessibleScopes.push_back(""); // global namespace
----------------
ilya-biryukov wrote:
> ioeric wrote:
> > ilya-biryukov wrote:
> > > Anonymous namespace inside other namespaces will also produce duplicate 
> > > scopes.
> > > Maybe simply remove the duplicates from the vector before we return it?
> > `printNamespaceScope()` will return "" for all anonymous namespaces, which 
> > should be covered as well.
> I don't think that's the case. 
> My understanding is that 
> `printNamespaceScope("foo::<anonymous>::bar::<anonymous>")` will return 
> `"foo::bar::"`.
Thanks for the catch! Switched to deduplicate scopes instead (D54105)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53926



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to