Skip to content

Commit 6913517

Browse files
authored
Token: removed test-only stringifyList() overload (#8411)
several other tests already use the multi-parameter version
1 parent 3836b2b commit 6913517

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

lib/token.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,11 +1421,6 @@ std::string Token::stringifyList(const Token* end, bool attributes) const
14211421
return stringifyList(false, attributes, false, false, false, nullptr, end);
14221422
}
14231423

1424-
std::string Token::stringifyList(bool varid) const
1425-
{
1426-
return stringifyList(varid, false, true, true, true, nullptr, nullptr);
1427-
}
1428-
14291424
void Token::astParent(Token* tok)
14301425
{
14311426
const Token* tok2 = tok;

lib/token.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ class CPPCHECKLIB Token {
11101110
options.files = true;
11111111
return options;
11121112
}
1113-
// cppcheck-suppress unusedFunction
1113+
// cppcheck-suppress unusedFunction - used in tests only
11141114
static stringifyOptions forDebugVarId() {
11151115
stringifyOptions options = forDebug();
11161116
options.varid = true;
@@ -1142,7 +1142,6 @@ class CPPCHECKLIB Token {
11421142

11431143
std::string stringifyList(const stringifyOptions& options, const std::vector<std::string>* fileNames = nullptr, const Token* end = nullptr) const;
11441144
std::string stringifyList(const Token* end, bool attributes = true) const;
1145-
std::string stringifyList(bool varid = false) const;
11461145

11471146
/**
11481147
* Stringify a list of token, from current instance on.

test/testsimplifytokens.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class TestSimplifyTokens : public TestFixture {
208208
ASSERT_LOC(tokenizer.tokenize(code), file, line);
209209

210210
// result..
211-
return tokenizer.tokens()->stringifyList(true);
211+
return tokenizer.tokens()->stringifyList(true, false, true, true, true);
212212
}
213213

214214

test/testtokenize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8378,7 +8378,7 @@ class TestTokenizer : public TestFixture {
83788378
// Tokenizer..
83798379
ASSERT_LOC(tokenizer.simplifyTokens1(""), file, line);
83808380

8381-
return tokenizer.tokens()->stringifyList();
8381+
return tokenizer.tokens()->stringifyList(false, false, true, true, true);
83828382
}
83838383

83848384
void checkHeader1() {

0 commit comments

Comments
 (0)