usethesource / clair

C Language Analysis in Rascal
BSD 2-Clause "Simplified" License
25 stars 12 forks source link

Problem resolving funny C++ constructs #79

Open linuswagner opened 10 months ago

linuswagner commented 10 months ago

If you try to parse

template<typename _Res, typename _T1, typename _T2 , bool _NE>
    struct _Reference_wrapper_base<_Res(*)(_T1, _T2) noexcept (_NE)>
    : binary_function<_T1, _T2, _Res>
    { };

(part of the pre-processor output of refwrap.h)

you get an element |problem:///f5ef9aee-b8a9-4a9c-83a7-4db94d180f09?message=Attempt%20to%20use%20symbol%20failed:%20| in the declared elements in the M3 (and some other, to be expected, problems, but this is a result of the snippet being incomplete). The problem refers to the *, which at other places can also occur like _Tp::* where typename _Tp

jurgenvinju commented 10 months ago

Let's have a look together. Thanks @linuswagner for reporting