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

Method checkOldStylePointerCast_

test/testother.cpp:2050–2061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2048#define checkOldStylePointerCast(...) checkOldStylePointerCast_(__FILE__, __LINE__, __VA_ARGS__)
2049 template<size_t size>
2050 void checkOldStylePointerCast_(const char* file, int line, const char (&code)[size], Standards::cppstd_t std = Standards::CPPLatest) {
2051
2052 const Settings settings = settingsBuilder().severity(Severity::warning).severity(Severity::style).cpp(std).build();
2053
2054 // Tokenize..
2055 SimpleTokenizer tokenizerCpp(settings, *this);
2056 ASSERT_LOC(tokenizerCpp.tokenize(code), file, line);
2057
2058 CheckOtherImpl checkOtherCpp(&tokenizerCpp, settings, *this);
2059 checkOtherCpp.warningOldStylePointerCast();
2060 checkOtherCpp.warningDangerousTypeCast();
2061 }
2062
2063 void oldStylePointerCast() {
2064 checkOldStylePointerCast("class Base{};\n"

Callers

nothing calls this directly

Calls 5

buildMethod · 0.80
cppMethod · 0.80
tokenizeMethod · 0.80

Tested by

no test coverage detected