Fixed #8259 (Don't combine &= for anonymous reference parameters)
This commit is contained in:
parent
1f418c1675
commit
c0272fc2ef
|
@ -1832,7 +1832,7 @@ void Tokenizer::combineOperators()
|
|||
const char c2 = tok->next()->str()[0];
|
||||
|
||||
// combine +-*/ and =
|
||||
if (c2 == '=' && (std::strchr("+-*/%&|^=!<>", c1))) {
|
||||
if (c2 == '=' && (std::strchr("+-*/%|^=!<>", c1))) {
|
||||
tok->str(tok->str() + c2);
|
||||
tok->deleteNext();
|
||||
continue;
|
||||
|
|
|
@ -911,6 +911,7 @@ private:
|
|||
ASSERT_EQUALS("; public: ;", tokenizeAndStringify(";public:;", false));
|
||||
ASSERT_EQUALS("; __published: ;", tokenizeAndStringify(";__published:;", false));
|
||||
ASSERT_EQUALS("a . public : ;", tokenizeAndStringify("a.public:;", false));
|
||||
ASSERT_EQUALS("void f ( x & = 2 ) ;", tokenizeAndStringify("void f(x &= 2);", false));
|
||||
}
|
||||
|
||||
void concatenateNegativeNumber() {
|
||||
|
|
Loading…
Reference in New Issue