forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.1'
Conflicts: src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp Change-Id: Icce6e8dd9b3afd9a0fe836e9babfb7a17cee9c4d
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef CPLUSPLUS_ALREADYCONSIDEREDCLASSCONTAINER_H
|
||||
#define CPLUSPLUS_ALREADYCONSIDEREDCLASSCONTAINER_H
|
||||
|
||||
#include <cplusplus/SafeMatcher.h>
|
||||
|
||||
#include <QSet>
|
||||
|
||||
namespace CPlusPlus {
|
||||
@@ -21,8 +23,9 @@ public:
|
||||
if (_container.contains(item))
|
||||
return true;
|
||||
|
||||
SafeMatcher matcher;
|
||||
foreach (const T *existingItem, _container) {
|
||||
if (existingItem->isEqualTo(item))
|
||||
if (Matcher::match(existingItem, item, &matcher))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1058,6 +1058,10 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
|
||||
instantiation->_name = templId;
|
||||
#endif // DEBUG_LOOKUP
|
||||
instantiation->_templateId = templId;
|
||||
|
||||
while (!origin->_symbols.isEmpty() && origin->_symbols[0]->isBlock())
|
||||
origin = origin->parent();
|
||||
|
||||
instantiation->_instantiationOrigin = origin;
|
||||
|
||||
// The instantiation should have all symbols, enums, and usings from the reference.
|
||||
@@ -1615,7 +1619,8 @@ bool CreateBindings::visit(Block *block)
|
||||
// nested ClassOrNamespaces)
|
||||
if (! _currentClassOrNamespace->_blocks.empty()
|
||||
|| ! _currentClassOrNamespace->_classOrNamespaces.empty()
|
||||
|| ! _currentClassOrNamespace->_enums.empty()) {
|
||||
|| ! _currentClassOrNamespace->_enums.empty()
|
||||
|| ! _currentClassOrNamespace->_anonymouses.empty()) {
|
||||
previous->_blocks[block] = binding;
|
||||
_entities.append(binding);
|
||||
} else {
|
||||
|
||||
@@ -866,8 +866,12 @@ ClassOrNamespace *ResolveExpression::findClass(const FullySpecifiedType &origina
|
||||
FullySpecifiedType ty = originalTy.simplified();
|
||||
ClassOrNamespace *binding = 0;
|
||||
|
||||
if (Class *klass = ty->asClassType())
|
||||
binding = _context.lookupType(klass, enclosingTemplateInstantiation);
|
||||
if (Class *klass = ty->asClassType()) {
|
||||
if (scope->isBlock())
|
||||
binding = _context.lookupType(klass->name(), scope, enclosingTemplateInstantiation);
|
||||
if (!binding)
|
||||
binding = _context.lookupType(klass, enclosingTemplateInstantiation);
|
||||
}
|
||||
|
||||
else if (NamedType *namedTy = ty->asNamedType())
|
||||
binding = _context.lookupType(namedTy->name(), scope, enclosingTemplateInstantiation);
|
||||
|
||||
@@ -47,6 +47,8 @@ QtcLibrary {
|
||||
"LiteralTable.h",
|
||||
"Literals.cpp",
|
||||
"Literals.h",
|
||||
"Matcher.cpp",
|
||||
"Matcher.h",
|
||||
"MemoryPool.cpp",
|
||||
"MemoryPool.h",
|
||||
"Name.cpp",
|
||||
@@ -62,6 +64,8 @@ QtcLibrary {
|
||||
"Parser.h",
|
||||
"QtContextKeywords.cpp",
|
||||
"QtContextKeywords.h",
|
||||
"SafeMatcher.cpp",
|
||||
"SafeMatcher.h",
|
||||
"Scope.cpp",
|
||||
"Scope.h",
|
||||
"Symbol.cpp",
|
||||
@@ -78,8 +82,6 @@ QtcLibrary {
|
||||
"TranslationUnit.h",
|
||||
"Type.cpp",
|
||||
"Type.h",
|
||||
"TypeMatcher.cpp",
|
||||
"TypeMatcher.h",
|
||||
"TypeVisitor.cpp",
|
||||
"TypeVisitor.h",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user