diff --git a/lib/token.cpp b/lib/token.cpp index 4d1d2f5890f..9377c60ef75 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -1421,11 +1421,6 @@ std::string Token::stringifyList(const Token* end, bool attributes) const return stringifyList(false, attributes, false, false, false, nullptr, end); } -std::string Token::stringifyList(bool varid) const -{ - return stringifyList(varid, false, true, true, true, nullptr, nullptr); -} - void Token::astParent(Token* tok) { const Token* tok2 = tok; diff --git a/lib/token.h b/lib/token.h index 51fe1b6b7d0..733887207ad 100644 --- a/lib/token.h +++ b/lib/token.h @@ -1110,7 +1110,7 @@ class CPPCHECKLIB Token { options.files = true; return options; } - // cppcheck-suppress unusedFunction + // cppcheck-suppress unusedFunction - used in tests only static stringifyOptions forDebugVarId() { stringifyOptions options = forDebug(); options.varid = true; @@ -1142,7 +1142,6 @@ class CPPCHECKLIB Token { std::string stringifyList(const stringifyOptions& options, const std::vector* fileNames = nullptr, const Token* end = nullptr) const; std::string stringifyList(const Token* end, bool attributes = true) const; - std::string stringifyList(bool varid = false) const; /** * Stringify a list of token, from current instance on. diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index f55b1e83fc7..4e227bfca17 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -208,7 +208,7 @@ class TestSimplifyTokens : public TestFixture { ASSERT_LOC(tokenizer.tokenize(code), file, line); // result.. - return tokenizer.tokens()->stringifyList(true); + return tokenizer.tokens()->stringifyList(true, false, true, true, true); } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index f7437cdf2e4..785f94aa0d5 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -8378,7 +8378,7 @@ class TestTokenizer : public TestFixture { // Tokenizer.. ASSERT_LOC(tokenizer.simplifyTokens1(""), file, line); - return tokenizer.tokens()->stringifyList(); + return tokenizer.tokens()->stringifyList(false, false, true, true, true); } void checkHeader1() {