Description
We should try to suggest missing headers and standard names for typo correction, including names not presently included.
For both C and C++. (Not that in C++ we don't need to do that when the std::module
is imported)
The main challenge here would be to find a way to maintain/generate these files, which is something I think GCC does manually.
Ideally, for each (namespace-qualified) name, we would track a standard version, a feature test macro, whether it is freestanding, and which header to include.
And we should do that for C++ and C.
Ideally, we would automate that process using either the standard source files or cppreference, or from an implementation that clang would parse.
Once we find a way to produce these indices, we can use a trie or some other structure that makes it easy to find loose matches, and from there, we can improve our typo correction warnings.
The whole thing should be usable from tools such as clangd