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

Function main

oss-fuzz/translate.cpp:24–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#include "type2.h"
23
24int main(int argc, char **argv)
25{
26 const char *filename = argc==2 ? argv[1] : nullptr;
27
28 if (!filename) {
29 std::cout << "Invalid args, no filename\n";
30 return 1;
31 }
32
33 std::ifstream f(filename);
34 if (!f.is_open()) {
35 std::cout << "failed to open file:" << filename << "\n";
36 return 1;
37 }
38
39 std::string str((std::istreambuf_iterator<char>(f)),
40 std::istreambuf_iterator<char>());
41
42 std::cout << generateCode2(reinterpret_cast<const uint8_t *>(str.data()), str.size()) << std::endl;
43
44 return 0;
45}
46

Callers

nothing calls this directly

Calls 3

generateCode2Function · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected