Fixed bug in Tokenizer::simplifyReference() (#6133)

This commit is contained in:
PKEuS 2014-10-16 11:43:42 +02:00
parent 9a755714b5
commit eefaddf980
2 changed files with 4 additions and 1 deletions

View File

@ -7359,7 +7359,7 @@ void Tokenizer::simplifyReference()
}
}
tok2->deleteNext(6+(tok->strAt(6)==")" ? 1 : 0));
tok2->deleteNext(6+(tok2->strAt(6)==")" ? 1 : 0));
}
}
tok = end;

View File

@ -3352,6 +3352,9 @@ private:
tok("void f() { int a; int &b(a); b++; }"));
ASSERT_EQUALS("void f ( ) { int a ; a ++ ; }",
tok("void f() { int a; int &b = a; b++; }"));
ASSERT_EQUALS("void test ( ) { c . f ( 7 ) ; }",
tok("void test() { c.f(7); T3 &t3 = c; }")); // #6133
}
void simplifyRealloc() {