nridge added inline comments.

================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:2133
   if (const auto *EnumDecl = dyn_cast<clang::EnumDecl>(ND.getDeclContext()))
-    return InTopLevelScope(*EnumDecl) && !EnumDecl->isScoped();
 
----------------
Just to make sure I understand:

By also removing the `!isScoped()` condition, in addition to changing the 
behaviour for the scenario described in 
https://github.com/clangd/clangd/issues/1082 (enum declared at class scope), 
you are also changing the behaviour for scenarios like this:

```
enum class Foo { Bar };  // at any scope, including global
```

Completing `Bar` will now offer `Foo::Bar` when previously it didn't.

Is this your intention?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136925/new/

https://reviews.llvm.org/D136925

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

Reply via email to