I would like to hear the gcc developers weigh in on whether such a tool (namely a variant invocation of gcc running through all of its lexing, parsing and semantic analysis) could ever be made to operate at speeds that would make gcc-based completion tolerable. And if not then in what way could the gcc codebase be leverage to support realistic completion?
This goes to a crucial part of the discussion that I feel RMS fails to acknowlege. Namely that clang is not a compiler frontend per se but a set of performance-focused components targeted at building C++-aware (often interactive) tools. clang-based completion is not an invocation of a compiler built by grafting clang onto llvm but rather communication with a caching server built using clang components.
We have existence proof that one can use clang libraries to build a C++ compiler competing with gcc. I wonder how realistic it is to expect gcc to be turned into components enabling construction of tools similar to those using clang:
To what extent does the "do not offer interfaces that might enable repurposing of gcc code for non-free projects" make it unlikely that such components might ever emerge?
/john