Bug 336197

Summary: parser does not understand 'auto*'
Product: [Applications] kdevelop Reporter: Matthew Woehlke <mwoehlke.floss>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.6.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

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!