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