#include "llvm-c/Remarks.h"
#include "llvm/Remarks/Remark.h"
#include "llvm/Remarks/RemarkParser.h"
#include "gtest/gtest.h"
#include <optional>
usingnamespacellvm;
template <size_t N> void parseGood(const char (&Buf)[N]) { … }
void parseGoodMeta(StringRef Buf) { … }
template <size_t N>
bool parseExpectError(const char (&Buf)[N], const char *Error) { … }
enum class CmpType { … };
void parseExpectErrorMeta(
StringRef Buf, const char *Error, CmpType Cmp,
std::optional<StringRef> ExternalFilePrependPath = std::nullopt) { … }
TEST(YAMLRemarks, ParsingEmpty) { … }
TEST(YAMLRemarks, ParsingNotYAML) { … }
TEST(YAMLRemarks, ParsingGood) { … }
#define COMMON_REMARK …
TEST(YAMLRemarks, ParsingTypes) { … }
#undef COMMON_REMARK
TEST(YAMLRemarks, ParsingMissingFields) { … }
TEST(YAMLRemarks, ParsingWrongTypes) { … }
TEST(YAMLRemarks, ParsingWrongArgs) { … }
static inline StringRef checkStr(StringRef Str, unsigned ExpectedLen) { … }
TEST(YAMLRemarks, Contents) { … }
static inline StringRef checkStr(LLVMRemarkStringRef Str,
unsigned ExpectedLen) { … }
TEST(YAMLRemarks, ContentsCAPI) { … }
TEST(YAMLRemarks, ContentsStrTab) { … }
TEST(YAMLRemarks, ParsingBadStringTableIndex) { … }
TEST(YAMLRemarks, ParsingGoodMeta) { … }
TEST(YAMLRemarks, ParsingBadMeta) { … }