https://bugs.kde.org/show_bug.cgi?id=368067
Bug ID: 368067 Summary: Wrong declaration is caught when class name as template parameter Product: kdevelop Version: 5.0.0 Platform: Appimage OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Language Support: CPP Assignee: kdevelop-bugs-n...@kde.org Reporter: afie...@gmail.com In the following code highlighting Foo in `void Foo::foo() {...}` shows the declaration to be the template parameter `typename Foo` instead of either the forward declaration or the actual declaration of the class. class Foo; template<typename Foo> class Bar; class Foo { void foo(); }; void Foo::foo() { std::cout << "foo\n"; } Reproducible: Always Steps to Reproduce: 1. Paste the above code into KDevelop 2. hover over Foo 3. click on the declaration hyperlink Actual Results: Jumps to the template parameter i.e. the Foo in `template<typename Foo> class Bar;` Expected Results: should jump to either the forward declaration `class Foo;` or preferably the actual declaration of the class Foo. Sorry for the terrible code, but these things do exist in old code bases and aren't removed until they make trouble. I removed it from mine so it doesn't bug me anymore, but it probably indicates something wrong with the C++ support. -- You are receiving this mail because: You are watching all bug changes.