Skip to content

Commit 7a647e2

Browse files
committed
fix
1 parent 35e76b5 commit 7a647e2

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎lib/tokenize.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,8 @@ namespace {
10331033
to = to->next();
10341034
to->isSimplifiedTypedef(true);
10351035
to->isExternC(from->isExternC());
1036+
if (from->isExpandedMacro())
1037+
to->setMacroName(from->getMacroName());
10361038
}
10371039
return to;
10381040
}

‎lib/tokenlist.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ Token *TokenList::copyTokens(Token *dest, const Token *first, const Token *last,
267267
tok2->flags(tok->flags());
268268
tok2->varId(tok->varId());
269269
tok2->setTokenDebug(tok->getTokenDebug());
270+
if (tok->isExpandedMacro())
271+
tok2->setMacroName(tok->getMacroName());
270272

271273
// Check for links and fix them up
272274
if (Token::Match(tok2, "(|[|{"))

0 commit comments

Comments
 (0)