From a8d2de3db9d9f92013d0ac6e52319b55590efea4 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 29 May 2016 08:50:39 +0800 Subject: AST - Remove dead code, add lifetime params, fix param clobber --- src/include/span.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/span.hpp b/src/include/span.hpp index e7bd2694..86d21514 100644 --- a/src/include/span.hpp +++ b/src/include/span.hpp @@ -67,5 +67,5 @@ Spanned make_spanned(Span sp, T val) { #define ERROR(span, code, msg) do { ::Span(span).error(code, [&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Error fell through" #code); } while(0) #define WARNING(span, code, msg) do { ::Span(span).warning(code, [&](::std::ostream& os) { os << msg; }); } while(0) #define BUG(span, msg) do { ::Span(span).bug([&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Bug fell through"); } while(0) -#define TODO(span, msg) do { ::Span(span).bug([&](::std::ostream& os) { os << "TODO: " << msg; }); throw ::std::runtime_error("Bug (todo) fell through"); } while(0) +#define TODO(span, msg) do { const char* __TODO_func = __func__; ::Span(span).bug([&](::std::ostream& os) { os << "TODO: " << __TODO_func << " - " << msg; }); throw ::std::runtime_error("Bug (todo) fell through"); } while(0) -- cgit v1.2.3