C++: Fix a crash in debug builds when rewriting functions.

Change-Id: I35266b69d1cc433c4d9176cc849efd03ea1cc1cd
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-25 11:28:51 +02:00
parent bf9782e307
commit e4a7b0642b
3 changed files with 9 additions and 0 deletions

View File

@@ -237,6 +237,11 @@ void Symbol::setScope(Scope *scope)
_scope = scope;
}
void Symbol::resetScope()
{
_scope = 0;
}
Namespace *Symbol::enclosingNamespace() const
{
for (Scope *s = _scope; s; s = s->enclosingScope()) {

View File

@@ -291,6 +291,7 @@ public:
Block *enclosingBlock() const;
void setScope(Scope *enclosingScope); // ### make me private
void resetScope(); // ### make me private
void setSourceLocation(unsigned sourceLocation, TranslationUnit *translationUnit); // ### make me private
void visitSymbol(SymbolVisitor *visitor);