Fixed bug in handling rvalue references: Scope has to be set everywhere. (#4732)

This commit is contained in:
PKEuS 2013-05-14 01:43:32 -07:00
parent 0076ebe08d
commit 1903585ea3
2 changed files with 2 additions and 0 deletions

View File

@ -2010,6 +2010,7 @@ bool Tokenizer::tokenize(std::istream &code,
if (var && var->isRValueReference()) {
const_cast<Token*>(var->typeEndToken())->str("&");
const_cast<Token*>(var->typeEndToken())->insertToken("&");
const_cast<Token*>(var->typeEndToken()->next())->scope(var->typeEndToken()->scope());
}
}

View File

@ -539,6 +539,7 @@ private:
ASSERT(false == v.isPointer());
ASSERT(true == v.isReference());
ASSERT(true == v.isRValueReference());
ASSERT(var.tokens()->tokAt(2)->scope());
}
void staticMemberVar() {