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

List:       kdevelop-bugs
Subject:    [Bug 261306] New: 'Jump to definition/declaration' works incorrectly
From:       Alexey Chernov <4ernov () gmail ! com>
Date:       2010-12-26 18:05:25
Message-ID: bug-261306-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=261306

           Summary: 'Jump to definition/declaration' works incorrectly in
                    case of name collision
           Product: kdevelop
           Version: 4.1.60
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP
        AssignedTo: kdevelop-bugs@kdevelop.org
        ReportedBy: 4ernov@gmail.com


Version:           4.1.60 (using KDE 4.5.4) 
OS:                Linux

'Jump to definition' and 'Jump to declaration' options work incorrectly in case
of matching of the names of functions. For instance, consider the following
code:

//foo.h
namespace
{
  class A
  {
    int read(int a, int b);
    void foo();
  }
}

//foo.cpp
#include "foo.h"

using namespace std;

void A::foo()
{
  read(0, 0);
}

int A::read(int a, int b)
{
}

It is very simplified version of my code to reproduce, so maybe any other
headers would be needed to include to reproduce fully. The result is:
- the compiler correctly solves the name conflict using read() method of class
as it has bigger priority
- when using 'jump to definition' or 'jump to declaration' options KDevelop
opens unistd.h (on Linux) header and read() function in it which is obviously
not correct in terms of compilation algorithm.

Reproducible: Always

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

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