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

Method simplifyIfSwitchForInit2

test/testtokenize.cpp:8547–8551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8545 }
8546
8547 void simplifyIfSwitchForInit2() {
8548 const Settings settings = settingsBuilder().cpp(Standards::CPP20).build();
8549 const char code[] = "void f() { if (a;b) {} else {} }";
8550 ASSERT_EQUALS("void f ( ) { { a ; if ( b ) { } else { } } }", tokenizeAndStringify(code, settings));
8551 }
8552
8553 void simplifyIfSwitchForInit3() {
8554 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