<div dir="ltr">Hi,<div><br></div><div>since I recall Milian bringing up one or two problems with the KDE cmake scripts and clang I'm wondering wether those are resolved for KDE 4.113 already? I happened to try out clang just earlier today and instantly ran into multiple problems in kdevplatform (while kate built just fine):</div>
<div><br></div><div><div>n file included from /usr/include//c++/4.8/bits/stl_tree.h:66:</div><div>/usr/include//c++/4.8/bits/alloc_traits.h:57:35: error: in-class initializer for static data member is not a constant expression</div>
<div>      static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);</div><div>                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>/usr/include//c++/4.8/bits/alloc_traits.h:64:19: note: in instantiation of template class 'std::__alloctr_rebind_helper<std::allocator<KDevelop::TopDUContext *>, KDevelop::TopDUContext *>' requested here</div>
<div>           bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value></div><div>                  ^</div><div>/usr/include//c++/4.8/bits/alloc_traits.h:202:9: note: in instantiation of default argument for '__alloctr_rebind<std::allocator<KDevelop::TopDUContext *>, KDevelop::TopDUContext *>' required here</div>
<div>        using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;</div><div>        ^~~~~</div><div>/usr/include//c++/4.8/ext/alloc_traits.h:196:47: note: in instantiation of template type alias 'rebind_alloc' requested here</div>
<div>      { typedef typename _Base_type::template rebind_alloc<_Tp> other; };</div><div>                                              ^</div><div>/usr/include//c++/4.8/bits/stl_vector.h:74:59: note: in instantiation of template class '__gnu_cxx::__alloc_traits<std::allocator<KDevelop::TopDUContext *> >::rebind<KDevelop::TopDUContext *>' requested here</div>
<div>      typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template</div><div>                                                          ^</div><div>/usr/include//c++/4.8/bits/stl_vector.h:210:30: note: in instantiation of template class 'std::_Vector_base<KDevelop::TopDUContext *, std::allocator<KDevelop::TopDUContext *> >' requested here</div>
<div>    class vector : protected _Vector_base<_Tp, _Alloc></div><div>                             ^</div><div>/home/andreas/src/kdevplatform/language/duchain/duchain.h:177:23: note: in instantiation of template class 'std::vector<KDevelop::TopDUContext *, std::allocator<KDevelop::TopDUContext *> >' requested here</div>
<div>      if(chainsByIndex.size() > index)</div></div><div><br></div><div>And also</div><div><br></div><div><div>In file included from /home/andreas/src/kdevplatform/language/backgroundparser/parsejob.cpp:44:</div><div>
/home/andreas/src/kdevplatform/language/duchain/duchain.h:179:23: error: cannot initialize a variable of type 'KDevelop::TopDUContext *' with an lvalue of type 'value_type' (aka 'int')</div><div>        TopDUContext* top = chainsByIndex[index];</div>
<div>                      ^     ~~~~~~~~~~~~~~~~~~~~</div></div><div><br></div><div><br></div><div>So I'm just wondering wether this is supposed to work and these really are genuine problems in the codebase (which gcc accepts for whatever reason) or there's still some general issue with using clang for KDE projects (at least for kdevplatform)?</div>
<div><br></div><div>Andreas</div><div><br></div><div>PS: Could this be triggered/caused by using ccache with clang? I believe I read such comments somewhere, but since other (non-KDE) projects work fine since quite some time now I thought that might have been FUD.</div>
</div>