clang 22.0.0git
Marshallers.cpp File Reference
#include "Marshallers.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Regex.h"
#include <optional>
#include <string>
#include "clang/Basic/AttrList.inc"
#include "clang/AST/OperationKinds.def"
#include "llvm/Frontend/OpenMP/OMP.inc"
#include "clang/Basic/TokenKinds.def"

Go to the source code of this file.

Macros

#define ATTR(X)
#define CAST_OPERATION(Name)
#define GEN_CLANG_CLAUSE_CLASS
#define CLAUSE_CLASS(Enum, Str, Class)
#define UNARY_EXPR_OR_TYPE_TRAIT(Spelling, Name, Key)
#define CXX11_UNARY_EXPR_OR_TYPE_TRAIT(Spelling, Name, Key)

Functions

static std::optional< std::string > getBestGuess (llvm::StringRef Search, llvm::ArrayRef< llvm::StringRef > Allowed, llvm::StringRef DropPrefix="", unsigned MaxEditDistance=3)
static std::optional< llvm::Regex::RegexFlags > getRegexFlag (llvm::StringRef Flag)
static std::optional< llvm::StringRef > getCloseRegexMatch (llvm::StringRef Flag)

Variables

static constexpr std::pair< llvm::StringRef, llvm::Regex::RegexFlags > RegexMap []

Macro Definition Documentation

◆ ATTR

#define ATTR ( X)
Value:
"attr::" #X,
#define X(type, name)
Definition Value.h:97

◆ CAST_OPERATION

#define CAST_OPERATION ( Name)
Value:
"CK_" #Name,

◆ CLAUSE_CLASS

#define CLAUSE_CLASS ( Enum,
Str,
Class )
Value:
#Enum,

◆ CXX11_UNARY_EXPR_OR_TYPE_TRAIT

#define CXX11_UNARY_EXPR_OR_TYPE_TRAIT ( Spelling,
Name,
Key )
Value:
"UETT_" #Name,

◆ GEN_CLANG_CLAUSE_CLASS

#define GEN_CLANG_CLAUSE_CLASS

◆ UNARY_EXPR_OR_TYPE_TRAIT

#define UNARY_EXPR_OR_TYPE_TRAIT ( Spelling,
Name,
Key )
Value:
"UETT_" #Name,

Function Documentation

◆ getBestGuess()

std::optional< std::string > getBestGuess ( llvm::StringRef Search,
llvm::ArrayRef< llvm::StringRef > Allowed,
llvm::StringRef DropPrefix = "",
unsigned MaxEditDistance = 3 )
static

Definition at line 17 of file Marshallers.cpp.

◆ getCloseRegexMatch()

std::optional< llvm::StringRef > getCloseRegexMatch ( llvm::StringRef Flag)
static

◆ getRegexFlag()

std::optional< llvm::Regex::RegexFlags > getRegexFlag ( llvm::StringRef Flag)
static

Definition at line 121 of file Marshallers.cpp.

References RegexMap.

Variable Documentation

◆ RegexMap

std::pair<llvm::StringRef, llvm::Regex::RegexFlags> RegexMap[]
staticconstexpr
Initial value:
= {
{"NoFlags", llvm::Regex::RegexFlags::NoFlags},
{"IgnoreCase", llvm::Regex::RegexFlags::IgnoreCase},
{"Newline", llvm::Regex::RegexFlags::Newline},
{"BasicRegex", llvm::Regex::RegexFlags::BasicRegex},
}

Definition at line 113 of file Marshallers.cpp.

Referenced by getCloseRegexMatch(), and getRegexFlag().