ilya-biryukov added a comment.

So to keep completion working, maybe we can give add enumerators with full 
qualification and have a flag that determines whether the last component of the 
qualifier can be ignored?
This would give a simple implementation path for now, and will add a semantic 
signal that we need to support enumerators, at least.
For example,

  enum En {
    A,
  };
  
  enum class ScopedEn {
    A
  };

will produce symbols with

  [ { Scope = "En::", 
      InsideUnscopedEnum=true, 
      Name="A"}, 
    { Scope = "ScopedEn::",
      InsideUnscopedEnum = false,
      Name = "A" } ]

fuzzyFind will have 2 variants:

- For code completion, it will return `En::A` only when queries with `::A` 
(e.g. in global scope).
- For workspace symbol, it can return `En::A` for `A` and `En::A`. For `::A` it 
can return empty results.

Scoped enums work the same as before. Other case (using decls and inline 
namespaces) will also work as before.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47223



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

Reply via email to