Skip to content

Commit

Permalink
Bugfix: Reset property info when Token::link() is set (< can be a bra…
Browse files Browse the repository at this point in the history
…cket or a comparison operator). Fixes #4075.
  • Loading branch information
PKEuS committed Aug 26, 2012
1 parent 8301b5d commit 6893948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/token.h
Expand Up @@ -374,6 +374,8 @@ class CPPCHECKLIB Token {
*/
void link(Token *linkToToken) {
_link = linkToToken;
if(_str == "<" || _str == ">")
update_property_info();
}

/**
Expand Down
3 changes: 3 additions & 0 deletions test/testother.cpp
Expand Up @@ -4280,6 +4280,9 @@ class TestOther : public TestFixture {
" }\n"
"}");
ASSERT_EQUALS("", errout.str());

check("DensePropertyMap<int, true> visited;"); // #4075
ASSERT_EQUALS("", errout.str());
}

void comparisonOfBoolWithInt2() {
Expand Down

0 comments on commit 6893948

Please sign in to comment.