MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / simplifyIfSwitchForInit1

Method simplifyIfSwitchForInit1

test/testtokenize.cpp:8541–8545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8539 }
8540
8541 void simplifyIfSwitchForInit1() {
8542 const Settings settings = settingsBuilder().cpp(Standards::CPP17).build();
8543 const char code[] = "void f() { if (a;b) {} }";
8544 ASSERT_EQUALS("void f ( ) { { a ; if ( b ) { } } }", tokenizeAndStringify(code, settings));
8545 }
8546
8547 void simplifyIfSwitchForInit2() {
8548 const Settings settings = settingsBuilder().cpp(Standards::CPP20).build();

Callers

nothing calls this directly

Calls 2

buildMethod · 0.80
cppMethod · 0.80

Tested by

no test coverage detected