We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ece4789 commit 56525cbCopy full SHA for 56525cb
test/testinternal.cpp
@@ -309,6 +309,12 @@ class TestInternal : public TestFixture {
309
" return tok->next()->next()->str();\n"
310
"}");
311
ASSERT_EQUALS("[test.cpp:2]: (style) Call to 'Token::next()' followed by 'Token::str()' can be simplified.\n", errout.str());
312
+
313
+ check("void f() {\n"
314
+ " return tok->previous()->next()->str();\n"
315
+ "}");
316
+ ASSERT_EQUALS("[test.cpp:2]: (style) Call to 'Token::previous()' followed by 'Token::next()' can be simplified.\n", errout.str());
317
318
}
319
320
void internalError() {
0 commit comments