diff options
author | Flex Ferrum <flexferrum@gmail.com> | 2012-01-28 22:58:08 +0400 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2012-01-31 10:03:36 +0100 |
commit | c6fc0be8ae15e43abb765323d7edaf7741405878 (patch) | |
tree | 28be4293dd50e455c4507f3f9646e4db91f0aca5 /src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp | |
parent | 0651e28d04933647740b92322fe8f7f279cb6954 (diff) |
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>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp b/src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp index 1a2e63d78c..6ed6f4e105 100644 --- a/src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp +++ b/src/libs/3rdparty/cplusplus/FullySpecifiedType.cpp @@ -47,7 +47,6 @@ FullySpecifiedType FullySpecifiedType::qualifiedType() const { FullySpecifiedType ty = *this; ty.setFriend(false); - ty.setAuto(false); ty.setRegister(false); ty.setStatic(false); ty.setExtern(false); @@ -236,4 +235,4 @@ bool FullySpecifiedType::match(const FullySpecifiedType &otherTy, TypeMatcher *m return false; return type()->matchType(otherTy.type(), matcher); -} +}
\ No newline at end of file |