From 1a80da62984d15040760456c4d56aa89a431e174 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 3 Feb 2022 21:22:45 +0200 Subject: [PATCH] Enable __PRETTY_FUNCTION__ on Clang, but disable top-level warning --- include/boost/assert/source_location.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/assert/source_location.hpp b/include/boost/assert/source_location.hpp index 6bb1ad0..abc029a 100644 --- a/include/boost/assert/source_location.hpp +++ b/include/boost/assert/source_location.hpp @@ -147,12 +147,12 @@ inline char const* srcloc_strip_top_level( char const* fn ) # define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, "") -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, ::boost::detail::srcloc_strip_top_level(__PRETTY_FUNCTION__)) # if defined(__clang__) -//# pragma clang diagnostic ignored "-W" +# pragma clang diagnostic ignored "-Wpredefined-identifier-outside-function" # endif #else