doxygen: made the todos visible in the doxygen output
This commit is contained in:
parent
17008879ac
commit
4f2520bef3
|
@ -273,7 +273,7 @@ void CheckClass::constructors()
|
||||||
className[1] = 0;
|
className[1] = 0;
|
||||||
const Token *classNameToken = tok1->tokAt(1);
|
const Token *classNameToken = tok1->tokAt(1);
|
||||||
|
|
||||||
// TODO: handling of private constructors should be improved.
|
/** @todo handling of private constructors should be improved */
|
||||||
bool hasPrivateConstructor = false;
|
bool hasPrivateConstructor = false;
|
||||||
{
|
{
|
||||||
int indentlevel = 0;
|
int indentlevel = 0;
|
||||||
|
@ -312,8 +312,8 @@ void CheckClass::constructors()
|
||||||
|
|
||||||
if (hasPrivateConstructor)
|
if (hasPrivateConstructor)
|
||||||
{
|
{
|
||||||
// TODO: Handle private constructors.
|
/** @todo Handle private constructors. Right now to avoid
|
||||||
// Right now to avoid false positives I just bail out
|
* false positives we just bail out */
|
||||||
tok1 = Token::findmatch(tok1->next(), pattern_class);
|
tok1 = Token::findmatch(tok1->next(), pattern_class);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -439,9 +439,9 @@ void CheckClass::privateFunctions()
|
||||||
// Locate some class
|
// Locate some class
|
||||||
for (const Token *tok1 = Token::findmatch(_tokenizer->tokens(), "class %var% {"); tok1; tok1 = Token::findmatch(tok1->next(), "class %var% {"))
|
for (const Token *tok1 = Token::findmatch(_tokenizer->tokens(), "class %var% {"); tok1; tok1 = Token::findmatch(tok1->next(), "class %var% {"))
|
||||||
{
|
{
|
||||||
// If the class implementation is incomplete there may be false positives about unused private functions.
|
/** @todo check that the whole class implementation is seen */
|
||||||
// Therefore I only check classes that are declared in the source file.
|
// until the todo above is fixed we only check classes that are
|
||||||
// Todo: check classes that are declared in header file too. make sure the whole implementation is seen.
|
// declared in the source file
|
||||||
if (tok1->fileIndex() != 0)
|
if (tok1->fileIndex() != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -456,7 +456,7 @@ void CheckClass::privateFunctions()
|
||||||
{
|
{
|
||||||
if (Token::Match(tok, "friend %var%"))
|
if (Token::Match(tok, "friend %var%"))
|
||||||
{
|
{
|
||||||
// Todo: Handle friend classes
|
/** @todo Handle friend classes */
|
||||||
FuncList.clear();
|
FuncList.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,6 @@ void CheckClass::noMemset()
|
||||||
if (!Token::Match(tok, "memset|memcpy|memmove"))
|
if (!Token::Match(tok, "memset|memcpy|memmove"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Todo: Handle memcpy and memmove
|
|
||||||
const char *type = NULL;
|
const char *type = NULL;
|
||||||
if (Token::Match(tok, "memset ( %var% , %num% , sizeof ( %type% ) )"))
|
if (Token::Match(tok, "memset ( %var% , %num% , sizeof ( %type% ) )"))
|
||||||
type = tok->strAt(8);
|
type = tok->strAt(8);
|
||||||
|
|
|
@ -532,7 +532,7 @@ const char * CheckMemoryLeakInFunction::call_func(const Token *tok, std::list<co
|
||||||
func_ = func_->next();
|
func_ = func_->next();
|
||||||
|
|
||||||
const char *ret = 0;
|
const char *ret = 0;
|
||||||
// TODO : "goto" isn't handled well
|
/** @todo handle "goto" */
|
||||||
if (Token::findmatch(func_, "dealloc"))
|
if (Token::findmatch(func_, "dealloc"))
|
||||||
ret = "dealloc";
|
ret = "dealloc";
|
||||||
else if (Token::findmatch(func_, "use"))
|
else if (Token::findmatch(func_, "use"))
|
||||||
|
@ -1119,7 +1119,6 @@ void CheckMemoryLeakInFunction::simplifycode(Token *tok, bool &all)
|
||||||
done = false;
|
done = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Make this more generic. Delete "if ; else use ; use"
|
|
||||||
else if (Token::Match(tok2, "; if ; else assign|use ; assign|use") ||
|
else if (Token::Match(tok2, "; if ; else assign|use ; assign|use") ||
|
||||||
Token::Match(tok2, "; if assign|use ; else ; assign|use"))
|
Token::Match(tok2, "; if assign|use ; else ; assign|use"))
|
||||||
{
|
{
|
||||||
|
@ -1274,7 +1273,7 @@ void CheckMemoryLeakInFunction::simplifycode(Token *tok, bool &all)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reduce "do { alloc ; } " => "alloc ;"
|
// Reduce "do { alloc ; } " => "alloc ;"
|
||||||
// TODO: If the loop can be executed twice reduce to "loop alloc ;" instead
|
/** @todo If the loop "do { alloc ; }" can be executed twice, reduce it to "loop alloc ;" */
|
||||||
if (Token::simpleMatch(tok2->next(), "do { alloc ; }"))
|
if (Token::simpleMatch(tok2->next(), "do { alloc ; }"))
|
||||||
{
|
{
|
||||||
Token::eraseTokens(tok2, tok2->tokAt(3));
|
Token::eraseTokens(tok2, tok2->tokAt(3));
|
||||||
|
@ -1552,7 +1551,7 @@ void CheckMemoryLeakInFunction::checkScope(const Token *Tok1, const char varname
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO : handle "goto"
|
/** @todo handle "goto" */
|
||||||
if (Token::findmatch(tok, "goto"))
|
if (Token::findmatch(tok, "goto"))
|
||||||
{
|
{
|
||||||
Tokenizer::deleteTokens(tok);
|
Tokenizer::deleteTokens(tok);
|
||||||
|
|
|
@ -233,7 +233,7 @@ public:
|
||||||
|
|
||||||
void check()
|
void check()
|
||||||
{
|
{
|
||||||
// TODO
|
/** @todo implement this */
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -172,7 +172,8 @@ void CheckUnusedFunctions::check()
|
||||||
}
|
}
|
||||||
else if (! func.usedOtherFile)
|
else if (! func.usedOtherFile)
|
||||||
{
|
{
|
||||||
/* TODO - add error message "function is only used in <file> it can be static"
|
/** @todo add error message "function is only used in <file> it can be static" */
|
||||||
|
/*
|
||||||
std::ostringstream errmsg;
|
std::ostringstream errmsg;
|
||||||
errmsg << "The function '" << it->first << "' is only used in the file it was declared in so it should have local linkage.";
|
errmsg << "The function '" << it->first << "' is only used in the file it was declared in so it should have local linkage.";
|
||||||
_errorLogger->reportErr( errmsg.str() );
|
_errorLogger->reportErr( errmsg.str() );
|
||||||
|
|
|
@ -75,10 +75,12 @@ void Preprocessor::writeError(const std::string &fileName, const std::string &co
|
||||||
// UTF / extended ASCII => The output from the preprocessor should only be standard ASCII
|
// UTF / extended ASCII => The output from the preprocessor should only be standard ASCII
|
||||||
if (ch < 0)
|
if (ch < 0)
|
||||||
{
|
{
|
||||||
// TODO: Remove characters that are redundant
|
/**
|
||||||
|
* @todo handle utf better:
|
||||||
// TODO: Convert characters that are needed to standard ASCII
|
* - remove characters that are redundant
|
||||||
|
* - convert needed characters to standard ASCII
|
||||||
|
*/
|
||||||
|
|
||||||
// Not sure how to handle this character. Bailing out.
|
// Not sure how to handle this character. Bailing out.
|
||||||
if (ch < 0)
|
if (ch < 0)
|
||||||
continue;
|
continue;
|
||||||
|
@ -703,7 +705,7 @@ bool Preprocessor::match_cfg_def(std::string cfg, std::string def)
|
||||||
|
|
||||||
std::string::size_type pos1 = pos + 8;
|
std::string::size_type pos1 = pos + 8;
|
||||||
const std::string par(def.substr(pos1, pos2 - pos1));
|
const std::string par(def.substr(pos1, pos2 - pos1));
|
||||||
// TODO: better checking if parameter is defined
|
/** @todo better checking if parameter is defined */
|
||||||
const bool isdefined(cfg.find(par) != std::string::npos);
|
const bool isdefined(cfg.find(par) != std::string::npos);
|
||||||
|
|
||||||
def.erase(pos, pos2 + 1 - pos);
|
def.erase(pos, pos2 + 1 - pos);
|
||||||
|
|
|
@ -271,7 +271,6 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
|
||||||
++p;
|
++p;
|
||||||
|
|
||||||
// Extract token from pattern..
|
// Extract token from pattern..
|
||||||
// TODO: Refactor this so there can't be buffer overflows
|
|
||||||
char str[500];
|
char str[500];
|
||||||
char *s = str;
|
char *s = str;
|
||||||
while (*p && *p != ' ')
|
while (*p && *p != ' ')
|
||||||
|
|
|
@ -1247,8 +1247,8 @@ void Tokenizer::simplifyTokenList()
|
||||||
}
|
}
|
||||||
else if (Token::simpleMatch(tempToken->next(), "["))
|
else if (Token::simpleMatch(tempToken->next(), "["))
|
||||||
{
|
{
|
||||||
// TODO: We need to find closing ], then check for
|
/** @todo We need to find closing ], then check for
|
||||||
// dots and arrows "var[some[0]]->other"
|
* dots and arrows "var[some[0]]->other" */
|
||||||
|
|
||||||
// But for now, just bail out
|
// But for now, just bail out
|
||||||
break;
|
break;
|
||||||
|
@ -2823,7 +2823,7 @@ void Tokenizer::fillFunctionList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the _functionList functions with duplicate names, remove them
|
// If the _functionList functions with duplicate names, remove them
|
||||||
// TODO this will need some better handling
|
/** @todo handle when functions with the same name */
|
||||||
for (unsigned int func1 = 0; func1 < _functionList.size();)
|
for (unsigned int func1 = 0; func1 < _functionList.size();)
|
||||||
{
|
{
|
||||||
bool hasDuplicates = false;
|
bool hasDuplicates = false;
|
||||||
|
|
Loading…
Reference in New Issue