|
clang 24.0.0git
|
Tracks exact Where.Parameters selectors from one API notes reader. More...
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Sema/SemaAPINotesInternal.h"
Public Member Functions | |
| void | addSelector (const api_notes::APINotesFunctionSelectorKey &Key) |
| void | addSelectors (llvm::ArrayRef< api_notes::APINotesFunctionSelectorKey > Selectors) |
| void | noteSeenDeclaration (const api_notes::APINotesFunctionSelectorKey &Key, llvm::StringRef Name, SourceLocation Loc) |
| void | markUsed (const api_notes::APINotesFunctionSelectorKey &Key) |
| void | markCandidatesUsed (llvm::function_ref< std::optional< api_notes::APINotesFunctionSelectorKey >(llvm::ArrayRef< std::string >)> GetSelectorKey, const APINotesParameterSelectorCandidates &Candidates) |
| void | diagnoseUnused (Sema &S, api_notes::APINotesReader &Reader) const |
Public Attributes | |
| llvm::DenseMap< api_notes::APINotesFunctionSelectorKey, bool > | SelectorUsed |
| Exact Where.Parameters selector keys stored by API notes. | |
| llvm::DenseMap< api_notes::APINotesFunctionSelectorKey, APINotesSelectorDiagnosticName > | SeenNames |
| Maps broad/name-only keys to a declaration location/name used for diagnostics. | |
Tracks exact Where.Parameters selectors from one API notes reader.
Sema marks selectors as used when a visible declaration matches them. It also records broad/name-only declarations seen in the translation unit, so end-of-TU diagnostics can warn about exact selectors for known names that were never matched.
Definition at line 41 of file SemaAPINotesInternal.h.
|
inline |
Definition at line 52 of file SemaAPINotesInternal.h.
References SelectorUsed.
Referenced by addSelectors().
|
inline |
Definition at line 56 of file SemaAPINotesInternal.h.
References addSelector(), SeenNames, and SelectorUsed.
| void APINotesSelectorDiagnosticReaderState::diagnoseUnused | ( | Sema & | S, |
| api_notes::APINotesReader & | Reader ) const |
Definition at line 1448 of file SemaAPINotes.cpp.
References clang::SemaBase::Diag(), clang::api_notes::formatAPINotesParameterSelector(), clang::api_notes::APINotesReader::getParameterSelectorSpellingsForDiagnostics(), SeenNames, and SelectorUsed.
| void APINotesSelectorDiagnosticReaderState::markCandidatesUsed | ( | llvm::function_ref< std::optional< api_notes::APINotesFunctionSelectorKey >(llvm::ArrayRef< std::string >)> | GetSelectorKey, |
| const APINotesParameterSelectorCandidates & | Candidates ) |
Definition at line 1101 of file SemaAPINotes.cpp.
References clang::APINotesParameterSelectorCandidates::Desugared, markUsed(), clang::APINotesParameterSelector::Parameters, and clang::APINotesParameterSelectorCandidates::Source.
|
inline |
Definition at line 69 of file SemaAPINotesInternal.h.
References SelectorUsed.
Referenced by markCandidatesUsed().
|
inline |
Definition at line 64 of file SemaAPINotesInternal.h.
References clang::api_notes::APINotesFunctionSelectorKey::getWithoutParameterSelector(), and SeenNames.
| llvm::DenseMap<api_notes::APINotesFunctionSelectorKey, APINotesSelectorDiagnosticName> clang::APINotesSelectorDiagnosticReaderState::SeenNames |
Maps broad/name-only keys to a declaration location/name used for diagnostics.
Definition at line 50 of file SemaAPINotesInternal.h.
Referenced by addSelectors(), diagnoseUnused(), and noteSeenDeclaration().
| llvm::DenseMap<api_notes::APINotesFunctionSelectorKey, bool> clang::APINotesSelectorDiagnosticReaderState::SelectorUsed |
Exact Where.Parameters selector keys stored by API notes.
The bool is true once Sema sees a declaration matching the exact selector.
Definition at line 44 of file SemaAPINotesInternal.h.
Referenced by addSelector(), addSelectors(), diagnoseUnused(), and markUsed().