14#ifndef LLVM_CLANG_BASIC_SIMPLETYPOCORRECTION_H
15#define LLVM_CLANG_BASIC_SIMPLETYPOCORRECTION_H
18#include "llvm/ADT/StringRef.h"
25 StringRef BestCandidate;
28 const unsigned MaxEditDistance;
29 unsigned BestEditDistance;
35 : BestCandidate(), Typo(Typo), MaxEditDistance((Typo.size() + 2) / 3),
36 BestEditDistance(MaxEditDistance + 1), BestIndex(0), NextIndex(0) {}
38 void add(
const StringRef Candidate);
39 void add(
const char *Candidate);
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
One of these records is kept for each identifier that is lexed.
std::optional< StringRef > getCorrection() const
void add(const StringRef Candidate)
SimpleTypoCorrection(StringRef Typo)
unsigned getCorrectionIndex() const
bool hasCorrection() const
The JSON file list parser is used to communicate input to InstallAPI.