|
LLVM
10.0.0
|
FileCheck class takes the request and exposes various methods that use information from the request. More...
#include "llvm/Support/FileCheck.h"
Public Member Functions | |
| FileCheck (FileCheckRequest Req) | |
| ~FileCheck () | |
| Regex | buildCheckPrefixRegex () |
| bool | readCheckFile (SourceMgr &SM, StringRef Buffer, Regex &PrefixRE) |
Reads the check file from Buffer and records the expected strings it contains. More... | |
| bool | ValidateCheckPrefixes () |
| StringRef | CanonicalizeFile (MemoryBuffer &MB, SmallVectorImpl< char > &OutputBuffer) |
| Canonicalizes whitespaces in the file. More... | |
| bool | checkInput (SourceMgr &SM, StringRef Buffer, std::vector< FileCheckDiag > *Diags=nullptr) |
Checks the input to FileCheck provided in the Buffer against the expected strings read from the check file and record diagnostics emitted in Diags. More... | |
FileCheck class takes the request and exposes various methods that use information from the request.
Definition at line 140 of file FileCheck.h.
|
explicit |
Definition at line 1111 of file FileCheck.cpp.
References ~FileCheck().
|
default |
Referenced by FileCheck().
| Regex FileCheck::buildCheckPrefixRegex | ( | ) |
Definition at line 1733 of file FileCheck.cpp.
References llvm::SmallString< InternalLen >::append(), llvm::StringRef::front(), llvm::cl::Prefix, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
| StringRef FileCheck::CanonicalizeFile | ( | MemoryBuffer & | MB, |
| SmallVectorImpl< char > & | OutputBuffer | ||
| ) |
Canonicalizes whitespaces in the file.
Line endings are replaced with UNIX-style '
'.
Definition at line 885 of file FileCheck.cpp.
References llvm::MemoryBuffer::getBufferSize(), llvm::MemoryBuffer::getBufferStart(), and llvm::SmallVectorImpl< T >::reserve().
| bool FileCheck::checkInput | ( | SourceMgr & | SM, |
| StringRef | Buffer, | ||
| std::vector< FileCheckDiag > * | Diags = nullptr |
||
| ) |
Checks the input to FileCheck provided in the Buffer against the expected strings read from the check file and record diagnostics emitted in Diags.
Errors are recorded against SM.
Definition at line 1915 of file FileCheck.cpp.
References llvm::FileCheckString::Check(), llvm::Check::CheckLabel, llvm::numbers::e, llvm::Pattern::getCheckTy(), llvm::StringRef::npos, llvm::FileCheckString::Pat, and llvm::StringRef::substr().
Reads the check file from Buffer and records the expected strings it contains.
Errors are reported against SM.
Only expected strings whose prefix is one of those listed in PrefixRE are recorded.
Definition at line 1117 of file FileCheck.cpp.
References llvm::SourceMgr::AddNewSourceBuffer(), assert(), llvm::Check::CheckBadCount, llvm::Check::CheckBadNot, llvm::Check::CheckDAG, llvm::Check::CheckEmpty, llvm::Check::CheckEOF, llvm::Check::CheckLabel, llvm::Check::CheckNext, llvm::Check::CheckNot, llvm::FileCheckRequest::CheckPrefixes, llvm::Check::CheckSame, llvm::StringRef::data(), llvm::SourceMgr::DK_Error, llvm::StringRef::drop_front(), E, llvm::StringRef::empty(), llvm::errs(), llvm::StringRef::find_first_not_of(), llvm::StringRef::find_first_of(), FindFirstMatchingPrefix(), llvm::SMLoc::getFromPointer(), llvm::MemoryBuffer::getMemBufferCopy(), llvm::FileCheckRequest::GlobalDefines, I, llvm::FileCheckRequest::ImplicitCheckNot, llvm::logAllUnhandledErrors(), llvm::FileCheckRequest::MatchFullLines, llvm::FileCheckRequest::NoCanonicalizeWhiteSpace, P, llvm::cl::Prefix, llvm::SourceMgr::PrintMessage(), llvm::StringRef::size(), llvm::StringRef::substr(), and std::swap().
| bool FileCheck::ValidateCheckPrefixes | ( | ) |
Definition at line 1715 of file FileCheck.cpp.
References llvm::StringSet< AllocatorTy >::insert(), llvm::cl::Prefix, and ValidateCheckPrefix().
1.8.13