C++: Type deduction for auto-declared variables implemented
authorFlex Ferrum <flexferrum@gmail.com>
Sat, 28 Jan 2012 18:58:08 +0000 (22:58 +0400)
committerRoberto Raggi <roberto.raggi@nokia.com>
Tue, 31 Jan 2012 09:03:36 +0000 (10:03 +0100)
commitc6fc0be8ae15e43abb765323d7edaf7741405878
tree28be4293dd50e455c4507f3f9646e4db91f0aca5
parent0651e28d04933647740b92322fe8f7f279cb6954
C++: Type deduction for auto-declared variables implemented

Handled to major cases of 'auto' variable declaration:
1. auto var = someInitializer;
2. Q_FOREACH(auto item, collection) or foreach(auto item, collection)

In first case type deducted directly from initializer. If variable has no initializer then corresponded error reported. In second case type deducted from '*collection.begin()' expression.

Change-Id: Ie930add1648b99440281ae04d973fd6904bc9e46
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/libs/3rdparty/cplusplus/Bind.cpp
src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp
src/libs/3rdparty/cplusplus/Symbols.cpp
src/libs/3rdparty/cplusplus/Symbols.h
src/libs/cplusplus/ResolveExpression.cpp