kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang.
Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D57950 Files: clangd/XRefs.cpp unittests/clangd/SymbolInfoTests.cpp Index: unittests/clangd/SymbolInfoTests.cpp =================================================================== --- unittests/clangd/SymbolInfoTests.cpp +++ unittests/clangd/SymbolInfoTests.cpp @@ -301,6 +301,12 @@ } )cpp", {CreateExpectedSymbolDetails("bar", "foo::", "c:@E@foo@bar")}}, + { + R"cpp( // Parameters in declarations + void foo(int ba^r); + )cpp", + {CreateExpectedSymbolDetails("bar", "foo", + "c:TestTU.cpp@50@F@foo#I#@bar")}}, { R"cpp( // Type inferrence with auto keyword struct foo {}; Index: clangd/XRefs.cpp =================================================================== --- clangd/XRefs.cpp +++ clangd/XRefs.cpp @@ -215,6 +215,7 @@ IndexOpts.SystemSymbolFilter = index::IndexingOptions::SystemSymbolFilterKind::All; IndexOpts.IndexFunctionLocals = true; + IndexOpts.IndexParametersInDeclarations = true; indexTopLevelDecls(AST.getASTContext(), AST.getPreprocessor(), AST.getLocalTopLevelDecls(), DeclMacrosFinder, IndexOpts);
Index: unittests/clangd/SymbolInfoTests.cpp =================================================================== --- unittests/clangd/SymbolInfoTests.cpp +++ unittests/clangd/SymbolInfoTests.cpp @@ -301,6 +301,12 @@ } )cpp", {CreateExpectedSymbolDetails("bar", "foo::", "c:@E@foo@bar")}}, + { + R"cpp( // Parameters in declarations + void foo(int ba^r); + )cpp", + {CreateExpectedSymbolDetails("bar", "foo", + "c:TestTU.cpp@50@F@foo#I#@bar")}}, { R"cpp( // Type inferrence with auto keyword struct foo {}; Index: clangd/XRefs.cpp =================================================================== --- clangd/XRefs.cpp +++ clangd/XRefs.cpp @@ -215,6 +215,7 @@ IndexOpts.SystemSymbolFilter = index::IndexingOptions::SystemSymbolFilterKind::All; IndexOpts.IndexFunctionLocals = true; + IndexOpts.IndexParametersInDeclarations = true; indexTopLevelDecls(AST.getASTContext(), AST.getPreprocessor(), AST.getLocalTopLevelDecls(), DeclMacrosFinder, IndexOpts);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits