Code Intelligence in Large C(++) Repositories
summary
Clangd needs a compile_commands.json to resolve symbols precisely, but generating those for thousands of build slices is slow, brittle and often out of date; builds in Ericsson hit multi-day generation, branching-by-preprocessor makes files compile many ways, and users see thousands of errors until configured. The practical alternative implemented wraps a CDT parser with CDT + CScope + CTags as a language server, indexes quickly (demo indexed 4,000 files), returns multiple candidate definitions and decent completions, and gives a usable unconfigured experience though it trades certainty for breadth.
AI-written summary · about
chapters (19)
- 0:00Indexing Challenges on a Large C Repository
- 1:55Some common terms
- 5:42Clangd Build Configurations
- 6:15Compilation Database
- 8:50Example of command capture
- 9:16What makes C so challenging?
- 12:09Pre-computing compile_commands.json?
- 14:22Shortfalls in Global Scoping
- 15:57Demo Project
- 16:23For discussion: Our project
- 17:00Compile Scope
- 17:35Global Scope
- 18:50Analysis in areas that aren't in the build configuration...
- 19:50The First Impression Problem
- 20:02It's a complex world
- 21:44Cscope+LSP4J
- 24:47Cscope+CDT+ctags
- 26:32Functionality
- 27:47Solving Problems with First Impression








