Re-enable okenizer::removeMacroInClassDef for C code
This commit is contained in:
parent
04209c08cf
commit
e683d31e71
|
@ -3916,8 +3916,6 @@ void Tokenizer::removeMacrosInGlobalScope()
|
|||
|
||||
void Tokenizer::removeMacroInClassDef()
|
||||
{
|
||||
if (!isCPP())
|
||||
return;
|
||||
for (Token *tok = list.front(); tok; tok = tok->next()) {
|
||||
if (Token::Match(tok, "class|struct %name% %name% {|:") &&
|
||||
(tok->next()->isUpperCaseName() || tok->tokAt(2)->isUpperCaseName())) {
|
||||
|
|
|
@ -8708,6 +8708,8 @@ private:
|
|||
void removeMacroInClassDef() { // #6058
|
||||
ASSERT_EQUALS("class Fred { } ;", tokenizeAndStringify("class DLLEXPORT Fred { } ;"));
|
||||
ASSERT_EQUALS("class Fred : Base { } ;", tokenizeAndStringify("class Fred FINAL : Base { } ;"));
|
||||
// Regression for C code:
|
||||
ASSERT_EQUALS("struct Fred { } ;", tokenizeAndStringify("struct DLLEXPORT Fred { } ;", false, true, Settings::Unspecified, "test.c"));
|
||||
}
|
||||
|
||||
void sizeofAddParentheses() {
|
||||
|
|
Loading…
Reference in New Issue