Skip to content

Commit

Permalink
Correction of an issue:
Browse files Browse the repository at this point in the history
In the following code

#if A
 void function(void)
 {
 }
#endif

A is qualified as Tag=CT_TYPE/Parent=FUNC_DEF instead of Tag=WORD/Parent=NONE.
  • Loading branch information
rdan committed Feb 5, 2012
1 parent 947b970 commit 053c278
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/combine.cpp
Expand Up @@ -3038,10 +3038,11 @@ static void mark_function(chunk_t *pc)
tmp = pc;
while ((tmp = chunk_get_prev_ncnl(tmp)) != NULL)
{
if (!chunk_is_type(tmp) &&
(tmp->type != CT_OPERATOR) &&
(tmp->type != CT_WORD) &&
(tmp->type != CT_ADDR))
if ((!chunk_is_type(tmp) &&
(tmp->type != CT_OPERATOR) &&
(tmp->type != CT_WORD) &&
(tmp->type != CT_ADDR)) ||
((tmp->flags & PCF_IN_PREPROC) != 0))
{
break;
}
Expand Down

0 comments on commit 053c278

Please sign in to comment.