test
test copied to clipboard
[patch] Clang 10 gives "marked as unused but used" warning on BOOST_AUTO_TEST_CASE
Compiling on FreeBSD 12.2 using Clang 10 and -Wall -Wextra -Werror gives this error when expanding BOOST_AUTO_TEST_CASE and other macros:
'unit_test_log' was marked unused but was used [-Werror,-Wused-but-marked-unused]
Attached is a patch which resolves the issue for me by removing the unused attribute from singleton references created by BOOST_TEST_SINGLETON_INST and instead having an inline function with an unused attribute that references the singleton.