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

Method tok_

test/testsimplifyusing.cpp:116–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114#define tok(...) tok_(__FILE__, __LINE__, __VA_ARGS__)
115 template<size_t size>
116 std::string tok_(const char* file, int line, const char (&code)[size], const TokOptions& options = make_default_obj()) {
117 const Settings settings = settingsBuilder(settings0).certainty(Certainty::inconclusive).debugwarnings(options.debugwarnings)
118 .platform(options.type).cpp(options.cppstd).build();
119
120 if (options.preprocess) {
121 SimpleTokenizer2 tokenizer(settings, *this, code, "test.cpp");
122
123 ASSERT_LOC(tokenizer.simplifyTokens1(""), file, line);
124 return tokenizer.tokens()->stringifyList(nullptr);
125 }
126
127 SimpleTokenizer tokenizer(settings, *this);
128 ASSERT_LOC(tokenizer.tokenize(code), file, line);
129
130 return tokenizer.tokens()->stringifyList(nullptr);
131 }
132
133 void simplifyUsing1() {
134 const char code[] = "class A\n"

Callers

nothing calls this directly

Calls 7

make_default_objClass · 0.85
buildMethod · 0.80
cppMethod · 0.80
debugwarningsMethod · 0.80
simplifyTokens1Method · 0.80
stringifyListMethod · 0.80
tokenizeMethod · 0.80

Tested by

no test coverage detected