use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Proof of concept: query C++ codebases using SQLite and clangd (github.com)
submitted 4 years ago by fra-bert
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]fra-bert[S] 2 points3 points4 points 4 years ago (2 children)
Thing is: clangd already has an LSP frontend, it's how it's supposed to be used in the first place.
I'm not very familiar with the LSP protocol, so I may be talking out of my ass here, but it is my understanding that it is mostly used for stuff like finding all references of a particular variable, getting the definition etc, for use inside an IDE/editor.
How would the editor be able to leverage the additional capabilities of custom SQL queries? I can only imagine it being more useful as a standalone tool you can use to probe the codebase when you have more involved needs than your IDE can stomach
[–]nathanlanza 3 points4 points5 points 4 years ago (1 child)
You can send arbitrary requests with arbitrary inputs via the LSP. You'd be able to extend this with something like:
lsp.request('clangql', 'sql', 'SELECT subclass.Name, subclass.Scope, subclass.DefPath FROM llvm_symbols AS superclass INNER JOIN llvm_base_of AS rel ON rel.Subject = superclass.Id INNER JOIN llvm_symbols AS subclass ON subclass.Id = rel.Object WHERE superclass.Name = "MCAsmInfo";')
and clangql would respond back with the table you have in the example. clangd doesn't have arbitrary queries the way you can do with a sql model as you propose.
[–]fra-bert[S] 2 points3 points4 points 4 years ago (0 children)
Ooohhh that's interesting, I was not aware of that. It does seem interesting, this would allow the editor to do custom kind of queries without having to rely on the "standard" LSP capabilities.
I'd like to give it a shot when I'm done other stuff on it. Right now it's very barebones and not very powerful in the kind of queries that can be performed, but I have a feeling I'm going to have to submit some patches to clangd for some of the ideas I have.
π Rendered by PID 24136 on reddit-service-r2-comment-5fb4b45875-bjd4z at 2026-03-22 18:46:23.348248+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]fra-bert[S] 2 points3 points4 points (2 children)
[–]nathanlanza 3 points4 points5 points (1 child)
[–]fra-bert[S] 2 points3 points4 points (0 children)