diff --git a/AK/SourceLocation.h b/AK/SourceLocation.h index ee77526fcf0..ba9366c48fa 100644 --- a/AK/SourceLocation.h +++ b/AK/SourceLocation.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include @@ -38,4 +39,12 @@ private: } +template<> +struct AK::Formatter : AK::Formatter { + void format(FormatBuilder& builder, AK::SourceLocation location) + { + return AK::Formatter::format(builder, "[{} @ {}:{}]", location.function_name(), location.file_name(), location.line_number()); + } +}; + using AK::SourceLocation;