This repository contains the modified source code and experimental scripts for the course report:
"Language Server Protocols: Surveying How Compiler Frontends Enable Intelligent Features".
The modifications were made based on the LLVM Project (approx. version 12-15). These instrumentations allow us to trace the internal lifecycle of LSP requests.
- src/clangd/: Contains the modified C++ source files from
llvm-project/clang-tools-extra/clangd/.Selection.cpp: Instrumented to dump theSelectionTreestructure (Case Study 1).XRefs.cpp: Instrumented to trace thelocateSymbolAtand resolution layer (Case Study 1).ClangdLSPServer.cpp: Instrumented to capture LSP layer requests (Case Study 1).FuzzyMatch.cpp: Instrumented to print scoring details for code completion (Case Study 2).Preamble.cpp: Instrumented to log preamble build triggers (Case Study 3).
- tests/: Contains the C++ test cases used to trigger the logs.
- Replace the corresponding files in a standard
llvm-projectsource tree with the files insrc/clangd/. - Recompile
clangdusingmake clangd. - Run
clangdwith your editor or via command line to see the>>> [Experiment]logs.