本文整理汇总了C++中Tokenizer::simplifyTokenList方法的典型用法代码示例。如果您正苦于以下问题:C++ Tokenizer::simplifyTokenList方法的具体用法?C++ Tokenizer::simplifyTokenList怎么用?C++ Tokenizer::simplifyTokenList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tokenizer
的用法示例。
在下文中一共展示了Tokenizer::simplifyTokenList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check
void check(const char code[])
{
// Tokenize..
Tokenizer tokenizer;
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
// Clear the error buffer..
errout.str("");
// Check for unused private functions..
Settings settings;
settings._checkCodingStyle = true;
CheckClass checkClass(&tokenizer, &settings, this);
checkClass.privateFunctions();
}
示例2: varScope
void varScope(const char code[])
{
// Tokenize..
Tokenizer tokenizer;
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
// Clear the error buffer..
errout.str("");
// Check for redundant code..
Settings settings;
settings._checkCodingStyle = true;
CheckOther checkOther(&tokenizer, &settings, this);
checkOther.checkVariableScope();
}
示例3: check
void check(const std::string &code)
{
// Tokenize..
Tokenizer tokenizer;
std::istringstream istr(code.c_str());
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
// Clear the error buffer..
errout.str("");
// Check char variable usage..
Settings settings;
settings.addEnabled("all");
CheckExceptionSafety checkExceptionSafety(&tokenizer, &settings, this);
checkExceptionSafety.runSimplifiedChecks(&tokenizer, &settings, this);
}
示例4: check
void check(const char code[])
{
// Tokenize..
Tokenizer tokenizer;
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
// Clear the error buffer..
errout.str("");
// Check for incomplete statements..
Settings settings;
settings._checkCodingStyle = true;
CheckOther checkOther(&tokenizer, &settings, this);
checkOther.checkIncompleteStatement();
}
示例5: check
void check(const char code[])
{
// Tokenize..
Tokenizer tokenizer;
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
// Simplify token list..
tokenizer.simplifyTokenList();
// Clear the error buffer..
errout.str("");
// Check for redundant code..
Settings settings;
CheckOther checkOther(&tokenizer, &settings, this);
checkOther.warningRedundantCode();
checkOther.checkZeroDivision();
}
示例6: check
void check(const char code[])
{
// Tokenize..
Tokenizer tokenizer;
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
// Assign variable ids
tokenizer.setVarId();
// Fill function list
tokenizer.fillFunctionList();
// Clear the error buffer..
errout.str("");
// Check auto variables
Settings settings;
CheckAutoVariables checkAutoVariables(&tokenizer, &settings, this);
checkAutoVariables.autoVariables();
checkAutoVariables.returnPointerToLocalArray();
}