I've found a couple of bugs while using the add-in. They have been added
to the todo:
a.. [High] Bug: The code analysis failed to recognize a local variable
occurrence.
a.. Details:
// Fails to recognize the last occurrence of bigBuffer as a local
variable
{
std::vector<int> bigBuffer;
{
KTEST_ASSERT_EQUAL( index, bigBuffer[index] );
}
}
This file can be found in bug/LocaleVariableNotRecognized?.cpp. The is a
unit test for it: IdentifierResolverTest?::testBug1()
a.. Solutions: seems to be related to the existence of the inner
CompoundStatement? (recognized correctly if removed).
b.. Status: to do
a.. [High] Bug: VC6 add-in crash when analysing the source
bug/ParserCrash?.cpp.
a.. Details:
// Crash when trying to rename the last occurrence of bigBuffer. (from
the add-in, seems to be in the IdentifierResolver?).
{
const int bufferSize = 256000;
std::vector<int> bigBuffer;
bigBuffer.reserve( bufferSize );
for ( int index =0; index < bufferSize; ++index )
bigBuffer[ index ] = 0;
const char *byteBuffer = (char *)&bigBuffer[0];
int recievedLength = 0;
int totalLength = sizeof(int) * bufferSize;
KTEST_ASSERT_EQUAL( index, bigBuffer[index] );
}
a.. Solutions: ?
b.. Status: to do
Notes: even though the second bug was constated while using the add-in, the
crash occurred during code analysis in IdentifierResolver.
Baptiste.
|