Fixed #8259 (Don't combine &= for anonymous reference parameters)

This commit is contained in:
Daniel Marjamäki 2018-04-01 10:27:16 +02:00
parent 1f418c1675
commit c0272fc2ef
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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() {