8#ifndef INSIGHTS_DPRINT_H
9#define INSIGHTS_DPRINT_H
11#include <source_location>
22 static constexpr const char emptyString[]{
""};
34 return arg.getZExtValue();
38inline const char*
Normalize(
const llvm::APSInt& arg)
56inline void FPrintf(
const char* fmt,
const auto&... args)
58 if constexpr(0 < (
sizeof...(args))) {
61 fprintf(stderr,
"%s", fmt);
71inline void DPrint([[maybe_unused]]
const char* fmt, [[maybe_unused]]
const auto&... args)
80inline void Error(
const char* fmt,
const auto&... args)
86inline void Dump([[maybe_unused]]
const auto* stmt)
99inline void Error(
const Decl* stmt,
const char* fmt,
const auto&... args)
112inline void Error(
const Stmt* stmt,
const char* fmt,
const auto&... args)
125 std::source_location loc = std::source_location::current());
127void ToDo(
const class Decl* stmt,
129 std::source_location loc = std::source_location::current());
132void ToDo(
const class TemplateArgument& stmt,
134 std::source_location loc = std::source_location::current());
void FPrintf(const char *fmt, const auto &... args)
const char * Normalize(const std::string &arg)
static void ToDo(std::string_view name, OutputFormatHelper &outputFormatHelper, std::source_location loc)
void Error(const char *fmt, const auto &... args)
Log an error.
void DPrint(const char *fmt, const auto &... args)
Debug print which is disabled in release-mode.
std::string ToString(const llvm::APSInt &val)
void Dump(const auto *stmt)