Fixed #1970 (Internal error. CheckClass::SpaceInfo::getVarList found variable '_root' with varid 0.)

This commit is contained in:
Daniel Marjamäki 2010-08-23 21:22:11 +02:00
parent f7063bed7c
commit 39a69b0871
2 changed files with 4 additions and 1 deletions

View File

@ -8088,7 +8088,7 @@ void Tokenizer::simplifyMicrosoftMFC()
tok->deleteNext();
tok->deleteNext();
}
else if (Token::Match(tok->next(), "DECLARE_DYNAMIC|DECLARE_DYNCREATE ( %any% )"))
else if (Token::Match(tok->next(), "DECLARE_DYNAMIC|DECLARE_DYNAMIC_CLASS|DECLARE_DYNCREATE ( %any% )"))
{
tok->deleteNext();
tok->deleteNext();

View File

@ -4476,6 +4476,9 @@ private:
const char code3[] = "class MyDialog : public CDialog { DECLARE_DYNCREATE(MyDialog) private: CString text; };";
ASSERT_EQUALS("class MyDialog : public CDialog { private: CString text ; } ;", tokenizeAndStringify(code3,false));
const char code4[] = "class MyDialog : public CDialog { DECLARE_DYNAMIC_CLASS(MyDialog) private: CString text; };";
ASSERT_EQUALS("class MyDialog : public CDialog { private: CString text ; } ;", tokenizeAndStringify(code4,false));
}
};