The early-claim hack was removed in 96f5cc1ee417f863f85756d1e56b1bed1bd76a7e,
we see a regression about captured var-decl in lambda, see https://github.com/clangd/clangd/issues/990.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/Selection.cpp | ||
---|---|---|
836 | I don't think this is an e.g., but rather is suitable for specifically this case. If there are other cases, we likely should be testing DeclaratorDecl here, and excluding Constructor/Destructor as before. | |
852 | I wonder whether we want to keep the CXXConstructExpr hack now, up to you. |
clang-tools-extra/clangd/Selection.cpp | ||
---|---|---|
836 | refined the comment. Testing DeclaratorDecl is safer, but we miss opportunities to know other cases (hopefully, there should be no other cases). For now, I'm leaning towards merely handling this specific case. If it turns out more cases, we can definitely use the DeclaratorDecl. | |
852 | if we remove it, than we need to add the CXXCtorInitializer case back to the earlySourceRange :( |
I don't think this is an e.g., but rather is suitable for specifically this case.
If there are other cases, we likely should be testing DeclaratorDecl here, and excluding Constructor/Destructor as before.