mesa: 07149f0252c52b4ac58b6df4e307fd786b49b490 (master) clang build error CXX core/libclover_la-kernel.lo In file included from core/kernel.cpp:23: In file included from ./core/kernel.hpp:28: In file included from ./core/object.hpp:33: In file included from ./core/property.hpp:28: In file included from ./util/range.hpp:29: ./util/adaptor.hpp:47:16: error: function cannot return function type 'std::vector<unsigned long, std::allocator<unsigned long> > (unsigned long, unsigned long)' F(typename std::iterator_traits<Is>::reference...) ^
Which version of clang were you using?
(In reply to comment #1) > Which version of clang were you using? $ clang++ --version Ubuntu clang version 3.4-1ubuntu2 (tags/RELEASE_34/final) (based on LLVM 3.4) Target: x86_64-pc-linux-gnu Thread model: posix
Created attachment 92932 [details] [review] clover_workaround_clang_function_argument_deduction.patch I suspect this is a clang bug. In the function call to "map(F &&f, ...)" in "util/factor.hpp:115" it deduces the template argument "F" as a function type instead of an lvalue-reference to function type, as it should be because the provided argument is an lvalue. Would you mind bringing this to the LLVM bug tracker? For the meantime you can use the attached work-around to get it to build with clang.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.