Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/Sema/CodeCompleteConsumer.h | ||
---|---|---|
284 ↗ | (On Diff #124584) | Maybe add a brief comment for consistency with other decls? |
lib/Sema/SemaCodeComplete.cpp | ||
4609 ↗ | (On Diff #124584) | Why do we alter this code path? |
4609 ↗ | (On Diff #124584) | Maybe we should add a test or provide examples why the current code does not work for us? |
4611 ↗ | (On Diff #124584) | Do we really want to set invalid scope specifiers here? |
Any tip on how this should be tested? I couldn't find any existing unit test for either SemaCodeComplete or code completion context (under clang/unittests). It might be possible to set up a unit test framework for code completion, but I'm not sure if it's worth to do so since this change doesn't change completion behavior.
If nothing uses getCXXScopeSpecifier right now we can't really test it with a clang or c-index-test regression test. A completion unit test could work here. I don't think we actually have existing completion unit tests though, so you would have to create one from scratch. But if getCXXScopeSpecifier will be used in a follow up patch maybe it will be easier to commit this without a test together with the followup patch?
lib/Sema/SemaCodeComplete.cpp | ||
---|---|---|
4609 ↗ | (On Diff #124584) | Makes sense, thanks for the explanation. |
I have another clangd patch that uses this, but this would still need to be a separate patch since they are in different repos...
You can commit the two in one either using the monrepo or sparse SVN checkout ;)
But I wouldn't object if you commit this separately right before the clangd patch, so LGTM
Fyi, you could find use of the new API in D40548
I'd like to land this patch if there is no objection.