Open layus opened 3 weeks ago
@llvm/issue-subscribers-clang-tidy
Author: Guillaume Maudoux (layus)
@layus: Could you please provide reproducer?
Yes, sure, have a look at https://github.com/layus/pinocchio/commits/clang-tidy-mwe/. I committed a reproducer script called repro.sh. my repro uses pinocchio (the forked repo), and libstdc++11 from ubuntu 22.04, downloaded from here https://www.ubuntuupdates.org/package/core/jammy/main/updates/libstdc%2B%2B-11-dev
Also, w.r.t. tags, it does not really hang. It crashes.
And just checked, still crashes with
LLVM (http://llvm.org/):
LLVM version 19.1.0-rc3
Optimized build.
Here is a short reproducer. Just run clang-tidy on it:
namespace std
{
template<typename _Tp, _Tp __v>
struct integral_constant
{
static constexpr _Tp value = __v;
};
/// The type used as a compile-time boolean with true value.
using true_type = integral_constant<bool, true>;
/// The type used as a compile-time boolean with false value.
using false_type = integral_constant<bool, false>;
} // namespace std
namespace bar
{
void baz()
{
auto foo(new boost::math::nonfinite_num_get<char>);
};
} // namespace bar
template<typename>
class set
{
set(set&&) = default;
set(initializer_list<value_type> __l,
const _Compare& __comp = _Compare(),
const allocator_type& __a = allocator_type())
: _M_t(__comp, _Key_alloc_type(__a))
{ _M_t._M_insert_range_unique(__l.begin(), __l.end()); };
};
Or even shorter:
namespace std
{
template<typename value_type>
class set
{
set(set&&) = default;
set(initializer_list<value_type> __l) { };
};
} // namespace std
@EugeneZelenko Could you have a second look and adapt the tags accordingly ? I am also interested to know if you can reproduce it too. Thanks :-)
Thanks for the reduction!
This may be fixed by #66810 when it lands
This looks like an infinite recursion leading to stack overflow.