Tokenizer: simplify DECLARE_DYNAMIC and DECLARE_DYNCREATE
This commit is contained in:
parent
ac9078857e
commit
77d634127c
|
@ -8065,13 +8065,6 @@ void Tokenizer::simplifyBuiltinExpect()
|
||||||
tok->deleteNext();
|
tok->deleteNext();
|
||||||
tok->deleteNext();
|
tok->deleteNext();
|
||||||
}
|
}
|
||||||
else if (Token::Match(tok->next(), "DECLARE_DYNAMIC ( %any% )"))
|
|
||||||
{
|
|
||||||
tok->deleteNext();
|
|
||||||
tok->deleteNext();
|
|
||||||
tok->deleteNext();
|
|
||||||
tok->deleteNext();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8087,6 +8080,13 @@ void Tokenizer::simplifyMicrosoftMFC()
|
||||||
tok->deleteNext();
|
tok->deleteNext();
|
||||||
tok->deleteNext();
|
tok->deleteNext();
|
||||||
}
|
}
|
||||||
|
else if (Token::Match(tok->next(), "DECLARE_DYNAMIC|DECLARE_DYNCREATE ( %any% )"))
|
||||||
|
{
|
||||||
|
tok->deleteNext();
|
||||||
|
tok->deleteNext();
|
||||||
|
tok->deleteNext();
|
||||||
|
tok->deleteNext();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4413,6 +4413,9 @@ private:
|
||||||
|
|
||||||
const char code2[] = "class MyDialog : public CDialog { DECLARE_DYNAMIC(MyDialog) private: CString text; };";
|
const char code2[] = "class MyDialog : public CDialog { DECLARE_DYNAMIC(MyDialog) private: CString text; };";
|
||||||
ASSERT_EQUALS("class MyDialog : public CDialog { private: CString text ; } ;", tokenizeAndStringify(code2,false));
|
ASSERT_EQUALS("class MyDialog : public CDialog { private: CString text ; } ;", tokenizeAndStringify(code2,false));
|
||||||
|
|
||||||
|
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));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue