Bug 336197 - parser does not understand 'auto*'
Summary: parser does not understand 'auto*'
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 4.6.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 23:26 UTC by Matthew Woehlke
Modified: 2014-06-23 16:36 UTC (History)
0 users

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 Matthew Woehlke 2014-06-13 23:26:38 UTC
Consider the following bit of code:
  auto* foo = new QWidget();

This is perfectly valid code, with 'foo' having the type 'QWdiget*'. Alas, KDevelop is very confused and thinks the type of 'foo' is 'int*'. If the '*' in the declaration is omitted (also legal, and does not change the type of 'foo'), KDevelop correctly deduces the type.

Reproducible: Always
Comment 1 Milian Wolff 2014-06-20 22:22:47 UTC
Git commit 881436b6620a9948f53be6590919791ac18195af by Milian Wolff.
Committed on 20/06/2014 at 22:21.
Pushed by mwolff into branch 'master'.

C++11: properly support "auto* v = ..." syntax.

M  +22   -1    languages/cpp/cppduchain/tests/test_duchain_cpp2011.cpp
M  +3    -2    languages/cpp/cppduchain/typebuilder.cpp

http://commits.kde.org/kdevelop/881436b6620a9948f53be6590919791ac18195af
Comment 2 Matthew Woehlke 2014-06-23 16:36:55 UTC
Awesome; thanks Milian!