#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/DiagnosticLex.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TokenKinds.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdio>
#include <cstring>
#include <string>
usingnamespaceclang;
static_assert …;
IdentifierIterator::~IdentifierIterator() = default;
IdentifierInfoLookup::~IdentifierInfoLookup() = default;
namespace {
class EmptyLookupIterator : public IdentifierIterator { … };
}
IdentifierIterator *IdentifierInfoLookup::getIdentifiers() { … }
IdentifierTable::IdentifierTable(IdentifierInfoLookup *ExternalLookup)
: … { … }
IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
IdentifierInfoLookup *ExternalLookup)
: … { … }
namespace {
enum TokenKey : unsigned { … };
enum KeywordStatus { … };
}
static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts,
TokenKey Flag) { … }
static KeywordStatus getKeywordStatus(const LangOptions &LangOpts,
unsigned Flags) { … }
static void AddKeyword(StringRef Keyword,
tok::TokenKind TokenCode, unsigned Flags,
const LangOptions &LangOpts, IdentifierTable &Table) { … }
static void AddCXXOperatorKeyword(StringRef Keyword,
tok::TokenKind TokenCode,
IdentifierTable &Table) { … }
static void AddObjCKeyword(StringRef Name,
tok::ObjCKeywordKind ObjCID,
IdentifierTable &Table) { … }
static void AddNotableIdentifier(StringRef Name,
tok::NotableIdentifierKind BTID,
IdentifierTable &Table) { … }
void IdentifierTable::AddKeywords(const LangOptions &LangOpts) { … }
static KeywordStatus getTokenKwStatus(const LangOptions &LangOpts,
tok::TokenKind K) { … }
bool IdentifierInfo::isKeyword(const LangOptions &LangOpts) const { … }
bool IdentifierInfo::isCPlusPlusKeyword(const LangOptions &LangOpts) const { … }
ReservedIdentifierStatus
IdentifierInfo::isReserved(const LangOptions &LangOpts) const { … }
ReservedLiteralSuffixIdStatus
IdentifierInfo::isReservedLiteralSuffixId() const { … }
StringRef IdentifierInfo::deuglifiedName() const { … }
tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const { … }
void IdentifierTable::PrintStats() const { … }
unsigned llvm::DenseMapInfo<clang::Selector>::getHashValue(clang::Selector S) { … }
bool Selector::isKeywordSelector(ArrayRef<StringRef> Names) const { … }
bool Selector::isUnarySelector(StringRef Name) const { … }
unsigned Selector::getNumArgs() const { … }
const IdentifierInfo *
Selector::getIdentifierInfoForSlot(unsigned argIndex) const { … }
StringRef Selector::getNameForSlot(unsigned int argIndex) const { … }
std::string MultiKeywordSelector::getName() const { … }
std::string Selector::getAsString() const { … }
void Selector::print(llvm::raw_ostream &OS) const { … }
LLVM_DUMP_METHOD void Selector::dump() const { … }
static bool startsWithWord(StringRef name, StringRef word) { … }
ObjCMethodFamily Selector::getMethodFamilyImpl(Selector sel) { … }
ObjCInstanceTypeFamily Selector::getInstTypeMethodFamily(Selector sel) { … }
ObjCStringFormatFamily Selector::getStringFormatFamilyImpl(Selector sel) { … }
namespace {
struct SelectorTableImpl { … };
}
static SelectorTableImpl &getSelectorTableImpl(void *P) { … }
SmallString<64>
SelectorTable::constructSetterName(StringRef Name) { … }
Selector
SelectorTable::constructSetterSelector(IdentifierTable &Idents,
SelectorTable &SelTable,
const IdentifierInfo *Name) { … }
std::string SelectorTable::getPropertyNameFromSetterSelector(Selector Sel) { … }
size_t SelectorTable::getTotalMemory() const { … }
Selector SelectorTable::getSelector(unsigned nKeys,
const IdentifierInfo **IIV) { … }
SelectorTable::SelectorTable() { … }
SelectorTable::~SelectorTable() { … }
const char *clang::getOperatorSpelling(OverloadedOperatorKind Operator) { … }
StringRef clang::getNullabilitySpelling(NullabilityKind kind,
bool isContextSensitive) { … }
llvm::raw_ostream &clang::operator<<(llvm::raw_ostream &OS,
NullabilityKind NK) { … }
diag::kind
IdentifierTable::getFutureCompatDiagKind(const IdentifierInfo &II,
const LangOptions &LangOpts) { … }