#include "RawStringLiteralCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::modernize {
namespace {
bool containsEscapes(StringRef HayStack, StringRef Escapes) { … }
bool isRawStringLiteral(StringRef Text) { … }
bool containsEscapedCharacters(const MatchFinder::MatchResult &Result,
const StringLiteral *Literal,
const CharsBitSet &DisallowedChars) { … }
bool containsDelimiter(StringRef Bytes, const std::string &Delimiter) { … }
std::string asRawStringLiteral(const StringLiteral *Literal,
const std::string &DelimiterStem) { … }
}
RawStringLiteralCheck::RawStringLiteralCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void RawStringLiteralCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void RawStringLiteralCheck::registerMatchers(MatchFinder *Finder) { … }
void RawStringLiteralCheck::check(const MatchFinder::MatchResult &Result) { … }
void RawStringLiteralCheck::replaceWithRawStringLiteral(
const MatchFinder::MatchResult &Result, const StringLiteral *Literal,
StringRef Replacement) { … }
}