tom-anders created this revision. tom-anders added a reviewer: nridge. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.
This was originally part of https://reviews.llvm.org/D136925, but we decided to move it to a separate patch. In case it turns out to be controversial, it can be reverted more easily. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D137104 Files: clang-tools-extra/clangd/CodeComplete.h clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp Index: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp +++ clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp @@ -1329,7 +1329,7 @@ AllOf(qName("Color"), forCodeCompletion(true)), AllOf(qName("Green"), forCodeCompletion(true)), AllOf(qName("Color2"), forCodeCompletion(true)), - AllOf(qName("Color2::Yellow"), forCodeCompletion(false)), + AllOf(qName("Color2::Yellow"), forCodeCompletion(true)), AllOf(qName("Color3"), forCodeCompletion(true)), AllOf(qName("Color3::Blue"), forCodeCompletion(true)), AllOf(qName("ns"), forCodeCompletion(true)), Index: clang-tools-extra/clangd/CodeComplete.h =================================================================== --- clang-tools-extra/clangd/CodeComplete.h +++ clang-tools-extra/clangd/CodeComplete.h @@ -291,7 +291,7 @@ // For index-based completion, we only consider: // * symbols in namespaces or translation unit scopes (e.g. no class // members, no locals) -// * enum constants in unscoped enum decl (e.g. "red" in "enum {red};") +// * enum constants (both scoped and unscoped) // * primary templates (no specializations) // For the other cases, we let Clang do the completion because it does not // need any non-local information and it will be much better at following
Index: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp +++ clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp @@ -1329,7 +1329,7 @@ AllOf(qName("Color"), forCodeCompletion(true)), AllOf(qName("Green"), forCodeCompletion(true)), AllOf(qName("Color2"), forCodeCompletion(true)), - AllOf(qName("Color2::Yellow"), forCodeCompletion(false)), + AllOf(qName("Color2::Yellow"), forCodeCompletion(true)), AllOf(qName("Color3"), forCodeCompletion(true)), AllOf(qName("Color3::Blue"), forCodeCompletion(true)), AllOf(qName("ns"), forCodeCompletion(true)), Index: clang-tools-extra/clangd/CodeComplete.h =================================================================== --- clang-tools-extra/clangd/CodeComplete.h +++ clang-tools-extra/clangd/CodeComplete.h @@ -291,7 +291,7 @@ // For index-based completion, we only consider: // * symbols in namespaces or translation unit scopes (e.g. no class // members, no locals) -// * enum constants in unscoped enum decl (e.g. "red" in "enum {red};") +// * enum constants (both scoped and unscoped) // * primary templates (no specializations) // For the other cases, we let Clang do the completion because it does not // need any non-local information and it will be much better at following
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits