[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [kdevelop] [Bug 368067] New: Wrong declaration is caught when class name as template parameter
From:       Afief Halumi via KDE Bugzilla <bugzilla_noreply () kde ! org>
Date:       2016-08-31 18:28:53
Message-ID: bug-368067-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

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-null@kde.org
          Reporter: afief.h@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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic