Bug 319833

Summary: Semantic Analysis doesn't understand the global scope operator "::" in deferred constructor calls.
Product: [Applications] kdevelop Reporter: Claus Christmann <hcc>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 4.5.60   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.0.0
Sentry Crash Report:

Description Claus Christmann 2013-05-14 17:49:05 UTC
Albeit being debatable horrible code, the semantic analysis parser creates an "Declaration not found: ::A" error for this piece of code:

#include <iostream>

struct A {
  A(int value = 23):i(value){};
  int i;
};

struct B {
  struct A : public ::A
  {
    A(): ::A(42){};
  };
};

int main(int argc, char **argv)
{
  A a1;
  B::A a2;

  return 0;
}

Reproducible: Always

Steps to Reproduce:
1. Copy-Paste the given example code into kdevelop
2. Observe the syntax highlighter creating a yellow squiggly line under "::A"
3. Move your mouse cursor over "::A"
Actual Results:  
"Declaration not found: ::A" error tool tip

Expected Results:  
"A( int value = 23 ) ..."  tool tip
Comment 1 Kevin Funk 2016-09-08 20:02:15 UTC
Hello!

We worked on a new clang-based C/C++ language plugin for KDevelop 5 which
supersedes the old C++ plugin in KDevelop 4. See e.g.:
https://www.kdevelop.org/news/first-beta-release-kdevelop-500-available
https://www.kdevelop.org/news/kdevelop-500-released

Due to a lack of manpower, we cannot fix bugs in the old C++ plugin. We rather
want to supply a good Clang based C++ experience for KDevelop 5 than wasting
our time on the legacy C++ support for KDevelop 4.

With the new clang-based C/C++ language plugin, the bug presented here does not
occur in my testing. For these reasons, I'll close this bug. Please try out
KDevelop 5, either by downloading it through your distro, or by playing around
with the AppImage:.

If you think this bug is applicable to Clang/KDevelop 5, please reopen the
report and add new information on how to reproduce the bug there.

Sorry for the inconvenience, I hope you understand the reasoning above.

Cheers