9#ifndef LLVM_CLANG_LIB_SEMA_SEMAAPINOTESINTERNAL_H
10#define LLVM_CLANG_LIB_SEMA_SEMAAPINOTESINTERNAL_H
14#include "llvm/ADT/ArrayRef.h"
15#include "llvm/ADT/DenseMap.h"
16#include "llvm/ADT/STLFunctionalExtras.h"
17#include "llvm/ADT/SmallVector.h"
18#include "llvm/ADT/StringRef.h"
44 llvm::DenseMap<api_notes::APINotesFunctionSelectorKey, bool>
SelectorUsed;
60 for (
const auto &
Selector : Selectors)
72 KnownSelector->second =
true;
76 llvm::function_ref<std::optional<api_notes::APINotesFunctionSelectorKey>(
Defines the clang::SourceLocation class and associated facilities.
Smart pointer class that efficiently represents Objective-C method names.
Sema - This implements semantic analysis and AST building for C.
Encodes a location in the source.
A class that reads API notes data from a binary file that was written by the APINotesWriter.
The JSON file list parser is used to communicate input to InstallAPI.
Source name and location for a declaration seen by Sema.
Tracks exact Where.Parameters selectors from one API notes reader.
void markUsed(const api_notes::APINotesFunctionSelectorKey &Key)
void diagnoseUnused(Sema &S, api_notes::APINotesReader &Reader) const
llvm::DenseMap< api_notes::APINotesFunctionSelectorKey, bool > SelectorUsed
Exact Where.Parameters selector keys stored by API notes.
void noteSeenDeclaration(const api_notes::APINotesFunctionSelectorKey &Key, llvm::StringRef Name, SourceLocation Loc)
void markCandidatesUsed(llvm::function_ref< std::optional< api_notes::APINotesFunctionSelectorKey >(llvm::ArrayRef< std::string >)> GetSelectorKey, const APINotesParameterSelectorCandidates &Candidates)
llvm::DenseMap< api_notes::APINotesFunctionSelectorKey, APINotesSelectorDiagnosticName > SeenNames
Maps broad/name-only keys to a declaration location/name used for diagnostics.
void addSelectors(llvm::ArrayRef< api_notes::APINotesFunctionSelectorKey > Selectors)
void addSelector(const api_notes::APINotesFunctionSelectorKey &Key)
Selector diagnostic state for all API notes readers used by one Sema.
APINotesSelectorDiagnosticReaderState & getOrCreateReaderState(api_notes::APINotesReader &Reader)
void diagnoseUnused(Sema &S) const
llvm::DenseMap< api_notes::APINotesReader *, APINotesSelectorDiagnosticReaderState > Readers
Stable reader-facing identity for an API notes function selector entry.
APINotesFunctionSelectorKey getWithoutParameterSelector() const