Bug 280244 - C++ parser thinks functions declared with parens around their name are function pointers
Summary: C++ parser thinks functions declared with parens around their name are functi...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 4.2.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 07:18 UTC by owlberteinstein
Modified: 2016-01-24 12:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description owlberteinstein 2011-08-17 07:18:37 UTC
Version:           4.2.3 (using KDE 4.7.0) 
OS:                Linux

The functions in Lua's headers are declared like

LUA_API int   (lua_gettop) (lua_State *L);

Hovering over the declaration shows a type of "function". Using code completion or hovering over the name at a call site shows that it thinks lua_gettop is a variable.

Reproducible: Always

Steps to Reproduce:
Write a function declaration with its name wrapped in parens, e.g.

void (foo)(int a);

Attempt to call it and use code completion with it to bring up the argument list.

Actual Results:  
I get a list of alternate completions, but no argument list. The completion list also shows the function to be a variable.

Expected Results:  
It should display the actual argument list and provide proper completion options.
Comment 1 Andrey Cygankov 2016-01-23 22:28:38 UTC
I tried to reproduce the bug in KDevelop 5 - I think, now everything displayed normal.
http://i.imgur.com/2Xe4618.png
Comment 2 Milian Wolff 2016-01-24 12:44:06 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