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

Method expandMacros

test/testpreprocessor.cpp:54–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52private:
53 template<size_t size>
54 std::string expandMacros(const char (&code)[size], ErrorLogger &errorLogger) const {
55 simplecpp::OutputList outputList;
56 std::vector<std::string> files;
57 simplecpp::TokenList tokens1 = simplecpp::TokenList(code, files, "file.cpp", &outputList);
58 Preprocessor p(tokens1, settingsDefault, errorLogger, Path::identify(tokens1.getFiles()[0], false));
59 ASSERT(p.loadFiles(files));
60 simplecpp::TokenList tokens2 = p.preprocess("", files, outputList);
61 (void)p.reportOutput(outputList, true);
62 return tokens2.stringify();
63 }
64
65 template<size_t size>
66 void preprocess(const char (&code)[size], std::vector<std::string> &files, const std::string& file0, TokenList& tokenlist, const simplecpp::DUI& dui)

Callers

nothing calls this directly

Calls 5

loadFilesMethod · 0.80
reportOutputMethod · 0.80
TokenListClass · 0.50
preprocessMethod · 0.45
stringifyMethod · 0.45

Tested by

no test coverage detected