Version: git master (using KDE 4.7.2) OS: Linux (example code in Steps to Reproduce) When I define a function pointer type from template parameters, KDevelop complains about "unexpected token: '<'", '*' and '...', while the code compiles fine in G++ 4.6.1. Reproducible: Always Steps to Reproduce: template<typename signature> class Function; template<typename ret, typename... Args> class Function<ret (*)(Args...)> : public Rose::Tuple<ret (*)(Args...), Args...> { }; template<typename c, typename ret, typename... Args> class Function<ret (c::*)(Args...)> : public Rose::Tuple<ret (c::*)(Args...), c, Args...> { }; Actual Results: "unexpected token" errors Expected Results: parsing given code without an error
I also found this issue in kdevelop 4.23 //--------- code -------------- typedef void (*PhysicObjectCallback) (PhysicObject* self, double timestep); PhysicObjectCallback userDynamicFunc; //----------------------------- If you point your mouse at "PhysicObjectCallback", it will give you the hint of "typedef void* PhysicObjectCallback", which is not correct.
Griwes, could you supply a compilable minimal example and maybe even reference the proper sections of the C++ standard that explains how your code should behave? I'll try to fix the parse error for now but couldn't understand it yet so I'm not sure whether I can fix it properly...
Ah this is actually a duplicate - no? *** This bug has been marked as a duplicate of bug 288439 ***
Git commit 81ec5b516fb1ea21fc5344ccf71488bbdec1f649 by Milian Wolff. Committed on 28/01/2013 at 00:52. Pushed by mwolff into branch '4.5'. Add basic support for typedef'ed function pointers. Properly deduce the function type and create correct declarations with the identifier of the sub_declaration id in cases such as: void (*funcptr)(int x); funcptr myFunc; int main() { myFunc(0); } Related: bug 307629 DIGEST: M +20 -4 languages/cpp/cppduchain/declarationbuilder.cpp M +12 -4 languages/cpp/cppduchain/tests/test_duchain.cpp http://commits.kde.org/kdevelop/81ec5b516fb1ea21fc5344ccf71488bbdec1f649
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively