[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-19 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349626: [Index] Index paremeters in lambda expressions. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D55437?vs=178688&id=178870#toc Repository: rC Clang CHA

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178688. hokein marked an inline comment as done. hokein added a comment. Fix a nit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178687. hokein added a comment. Rebase and simplify the test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-lambdas.cpp Index: t

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Index/IndexBody.cpp:464 + if (DC && isLambdaCallOperator(DC)) { +IndexCtx.handleDecl(D); + } NIT: remove

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D55437#1333145 , @ilya-biryukov wrote: > Update after investigating with @hokein offline: the `RecursiveASTVisitor` > has custom code to visit lambda parameters and return type, but it fallback > to visiting typelocs when both

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178660. hokein added a comment. Update the patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-lambdas.cpp Index: test/Index/cx

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Update after investigating with @hokein offline: the `RecursiveASTVisitor` has custom code to visit lambda parameters and return type, but it fallback to visiting typelocs when both parameters and a return type are specified. Unfortunately this fallback does not w

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178437. hokein added a comment. Update the patch, add comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-lambdas.cpp Index:

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The `RecursiveASTVisitor` seems to have the code that properly traverses parameters and return types of lambdas. Any ideas why it's not getting called here? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, ioeric. This fixes clangd couldn't find references for lambda parameters. Repository: rC Clang https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx