diff --git a/include/boost/assert/source_location.hpp b/include/boost/assert/source_location.hpp index a85e679..c6c3e78 100644 --- a/include/boost/assert/source_location.hpp +++ b/include/boost/assert/source_location.hpp @@ -84,6 +84,12 @@ template std::basic_ostream & operator<<( std::basic_ost # define BOOST_CURRENT_LOCATION ::boost::source_location() +#elif defined(__clang_analyzer__) + +// Cast to char const* to placate clang-tidy +// https://bugs.llvm.org/show_bug.cgi?id=28480 +# define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, static_cast(BOOST_CURRENT_FUNCTION)) + #else # define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION)