tom-anders marked an inline comment as done.
tom-anders added inline comments.


================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:2136
+  if (llvm::isa<clang::EnumDecl>(ND.getDeclContext()))
+    return true;
 
----------------
nridge wrote:
> Why remove the `(InTopLevelScope(*EnumDecl) || InClassScope(*EnumDecl))` part?
Huh, because I thought this covered all the scopes where you could declare 
enums anyway, but of course that's wrong - You can e.g. declare a 
function-local enum, which we of course don't want to index. 


================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:2136
+  if (llvm::isa<clang::EnumDecl>(ND.getDeclContext()))
+    return true;
 
----------------
tom-anders wrote:
> nridge wrote:
> > Why remove the `(InTopLevelScope(*EnumDecl) || InClassScope(*EnumDecl))` 
> > part?
> Huh, because I thought this covered all the scopes where you could declare 
> enums anyway, but of course that's wrong - You can e.g. declare a 
> function-local enum, which we of course don't want to index. 
d


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137104

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

Reply via email to