Added a few TODO comments
This commit is contained in:
parent
36a84c5406
commit
9d8e5e36eb
|
@ -3,4 +3,3 @@
|
||||||
<define name="TEST(A,B)" value="void __ ## A ## _ ## B ( )"/>
|
<define name="TEST(A,B)" value="void __ ## A ## _ ## B ( )"/>
|
||||||
<define name="TEST_F(A,B)" value="void __ ## A ## _ ## B ( )"/>
|
<define name="TEST_F(A,B)" value="void __ ## A ## _ ## B ( )"/>
|
||||||
</def>
|
</def>
|
||||||
|
|
||||||
|
|
|
@ -668,6 +668,7 @@ const Token * CheckLeakAutoVar::checkTokenInsideExpression(const Token * const t
|
||||||
{
|
{
|
||||||
// Deallocation and then dereferencing pointer..
|
// Deallocation and then dereferencing pointer..
|
||||||
if (tok->varId() > 0) {
|
if (tok->varId() > 0) {
|
||||||
|
// TODO : Write a separate checker for this that uses valueFlowForward.
|
||||||
const std::map<unsigned int, VarInfo::AllocInfo>::const_iterator var = varInfo->alloctype.find(tok->varId());
|
const std::map<unsigned int, VarInfo::AllocInfo>::const_iterator var = varInfo->alloctype.find(tok->varId());
|
||||||
if (var != varInfo->alloctype.end()) {
|
if (var != varInfo->alloctype.end()) {
|
||||||
bool unknown = false;
|
bool unknown = false;
|
||||||
|
|
|
@ -2035,6 +2035,7 @@ void CheckMemoryLeakInFunction::checkScope(const Token *startTok, const std::str
|
||||||
tok2->deleteNext();
|
tok2->deleteNext();
|
||||||
}
|
}
|
||||||
if ((result = Token::findmatch(tok, "[;{}] dealloc ; use_ ;")) != nullptr) {
|
if ((result = Token::findmatch(tok, "[;{}] dealloc ; use_ ;")) != nullptr) {
|
||||||
|
// TODO : Write a separate checker for this that uses valueFlowForward.
|
||||||
deallocuseError(result->tokAt(3), varname);
|
deallocuseError(result->tokAt(3), varname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -473,6 +473,7 @@ static bool checkExceptionHandling(const Token* tok)
|
||||||
|
|
||||||
void CheckOther::checkRedundantAssignment()
|
void CheckOther::checkRedundantAssignment()
|
||||||
{
|
{
|
||||||
|
// TODO: This function should be rewritten, it's far too complex.
|
||||||
const bool printPerformance = mSettings->isEnabled(Settings::PERFORMANCE);
|
const bool printPerformance = mSettings->isEnabled(Settings::PERFORMANCE);
|
||||||
const bool printStyle = mSettings->isEnabled(Settings::STYLE);
|
const bool printStyle = mSettings->isEnabled(Settings::STYLE);
|
||||||
const bool printWarning = mSettings->isEnabled(Settings::WARNING);
|
const bool printWarning = mSettings->isEnabled(Settings::WARNING);
|
||||||
|
|
|
@ -3946,6 +3946,7 @@ static void valueFlowSubFunction(TokenList *tokenlist, ErrorLogger *errorLogger,
|
||||||
if (!calledFunctionScope)
|
if (!calledFunctionScope)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// TODO: Rewrite this. It does not work well to inject 1 argument at a time.
|
||||||
const std::vector<const Token *> &callArguments = getArguments(tok);
|
const std::vector<const Token *> &callArguments = getArguments(tok);
|
||||||
for (unsigned int argnr = 0U; argnr < callArguments.size(); ++argnr) {
|
for (unsigned int argnr = 0U; argnr < callArguments.size(); ++argnr) {
|
||||||
const Token *argtok = callArguments[argnr];
|
const Token *argtok = callArguments[argnr];
|
||||||
|
|
Loading…
Reference in New Issue