forked from qt-creator/qt-creator
C++: fix cloning of templates
Fix instantiation of templates(by cloning original symbols). Assigning of scope for cloned symbol is taken from the symbol which is used to instantiate. Task-number: QTCREATORBUG-9098 Change-Id: I066cc8b5f69333fabdaf2d4466b205baf08bd3f1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
b55961d225
commit
17cd161a9d
7
src/libs/3rdparty/cplusplus/Symbol.cpp
vendored
7
src/libs/3rdparty/cplusplus/Symbol.cpp
vendored
@@ -105,7 +105,7 @@ Symbol::Symbol(TranslationUnit *translationUnit, unsigned sourceLocation, const
|
||||
|
||||
Symbol::Symbol(Clone *clone, Subst *subst, Symbol *original)
|
||||
: _name(clone->name(original->_name, subst)),
|
||||
_scope(original->_scope),
|
||||
_scope(0),
|
||||
_next(0),
|
||||
_fileId(clone->control()->stringLiteral(original->fileName(), original->fileNameLength())),
|
||||
_sourceLocation(original->_sourceLocation),
|
||||
@@ -296,6 +296,11 @@ Block *Symbol::enclosingBlock() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
Scope *Symbol::scope() const
|
||||
{
|
||||
return _scope;
|
||||
}
|
||||
|
||||
unsigned Symbol::index() const
|
||||
{ return _index; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user