clang  14.0.0git
Macros | Functions | Variables
Marshallers.cpp File Reference
#include "Marshallers.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Regex.h"
#include <string>
#include "clang/Basic/AttrList.inc"
#include "clang/AST/OperationKinds.def"
#include "llvm/Frontend/OpenMP/OMP.inc"
#include "clang/Basic/TokenKinds.def"
Include dependency graph for Marshallers.cpp:

Go to the source code of this file.

Macros

#define ATTR(X)   "attr::" #X,
 
#define CAST_OPERATION(Name)   "CK_" #Name,
 
#define GEN_CLANG_CLAUSE_CLASS
 
#define CLAUSE_CLASS(Enum, Str, Class)   #Enum,
 
#define UNARY_EXPR_OR_TYPE_TRAIT(Spelling, Name, Key)   "UETT_" #Name,
 
#define CXX11_UNARY_EXPR_OR_TYPE_TRAIT(Spelling, Name, Key)   "UETT_" #Name,
 

Functions

static llvm::Optional< std::stringgetBestGuess (llvm::StringRef Search, llvm::ArrayRef< llvm::StringRef > Allowed, llvm::StringRef DropPrefix="", unsigned MaxEditDistance=3)
 
static llvm::Optional< llvm::Regex::RegexFlags > getRegexFlag (llvm::StringRef Flag)
 
static llvm::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)    "attr::" #X,

◆ CAST_OPERATION

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

◆ CLAUSE_CLASS

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

◆ CXX11_UNARY_EXPR_OR_TYPE_TRAIT

#define CXX11_UNARY_EXPR_OR_TYPE_TRAIT (   Spelling,
  Name,
  Key 
)    "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 
)    "UETT_" #Name,

Function Documentation

◆ getBestGuess()

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

◆ getCloseRegexMatch()

static llvm::Optional<llvm::StringRef> getCloseRegexMatch ( llvm::StringRef  Flag)
static

◆ getRegexFlag()

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

Definition at line 125 of file Marshallers.cpp.

References RegexMap.

Variable Documentation

◆ RegexMap

constexpr 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 117 of file Marshallers.cpp.

Referenced by getCloseRegexMatch(), and getRegexFlag().