Fixed bug in handling rvalue references: Scope has to be set everywhere. (#4732)
This commit is contained in:
parent
0076ebe08d
commit
1903585ea3
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue