Skip to content

Typo corrections for standard names #139855

Open
0 of 3 issues completed
Open
Feature
0 of 3 issues completed
@cor3ntin

Description

@cor3ntin

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

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    cc++clangClang issues not falling into any other categoryclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"clangd

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions