llvm/llvm/lib/Support/Regex.cpp

//===-- Regex.cpp - Regular Expression matcher implementation -------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements a POSIX regular expression matcher.
//
//===----------------------------------------------------------------------===//

#include "llvm/Support/Regex.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "regex_impl.h"

#include <cassert>
#include <string>

usingnamespacellvm;

Regex::Regex() :{}

Regex::Regex(StringRef regex, RegexFlags Flags) {}

Regex::Regex(StringRef regex, unsigned Flags)
    :{}

Regex::Regex(Regex &&regex) {}

Regex::~Regex() {}

namespace {

/// Utility to convert a regex error code into a human-readable string.
void RegexErrorToString(int error, struct llvm_regex *preg,
                        std::string &Error) {}

} // namespace

bool Regex::isValid(std::string &Error) const {}

/// getNumMatches - In a valid regex, return the number of parenthesized
/// matches it contains.
unsigned Regex::getNumMatches() const {}

bool Regex::match(StringRef String, SmallVectorImpl<StringRef> *Matches,
                  std::string *Error) const {}

std::string Regex::sub(StringRef Repl, StringRef String,
                       std::string *Error) const {}

// These are the special characters matched in functions like "p_ere_exp".
static const char RegexMetachars[] =;

bool Regex::isLiteralERE(StringRef Str) {}

std::string Regex::escape(StringRef String) {}