Bug 189912 - C++ parser can't parse type traits header
Summary: C++ parser can't parse type traits header
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: git master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 221707 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-17 20:36 UTC by Thomas McGuire
Modified: 2016-01-24 12:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2009-04-17 20:36:46 UTC
Version:           3.9.92 (using KDevPlatform 0.9.92) (using 4.2.70 (KDE 4.2.70 (KDE 4.3 >= 20090415)), compiled sources)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.27.21-0.1-default

KDevelop has problems parsing /usr/include/c++/ext/type_traits.h

A minimal testcase which shows the problem:

template<typename T>
class B
{
  public:

    struct foo {};
};

template<typename T1, typename T2>
class D
{
  typedef typename B<T1>::foo baz;
  typedef typename B<T2>::foo bar;

  typedef typeof(baz() + bar()) barbaz;
};

This compiles fine, but the parser complains about the line with 'typeof'.
(I've not seen the syntax before, but it compiles, so it is probably valid)
Comment 1 Andreas Pakulat 2010-01-07 22:37:59 UTC
*** Bug 221707 has been marked as a duplicate of this bug. ***
Comment 2 Ignat Semenov 2010-01-08 10:20:36 UTC
Any hint as to where I can find any info on this weird code which doesn't look like valid C++? It's really interesting for me, and we have to find the actual problem in the duchain.
Comment 3 Nicolás Alvarez 2010-11-17 01:57:08 UTC
typeof is a gcc extension. It's documented here: http://gcc.gnu.org/onlinedocs/gcc/Typeof.html
Comment 4 Andrey Cygankov 2016-01-23 22:24:31 UTC
I tried to reproduce the bug - in the header file all displayed normal.
http://i.imgur.com/rKez68N.png
Probably it is necessary to close.
Comment 5 Milian Wolff 2016-01-24 12:47:19 UTC
Hello!

We are working 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

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 stay tuned
for KDevelop 5.

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