blob: cd2f0885ded291dc486bdb6cfcd7087f9a05dfb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/**
* @file flag_decltype.cpp
*
* @license GPL v2+
*/
#include "chunk_list.h"
#include "flag_decltype.h"
bool flag_cpp_decltype(chunk_t *pc)
{
LOG_FUNC_ENTRY();
if (chunk_is_token(pc, CT_DECLTYPE))
{
auto paren_open = chunk_get_next_ncnl(pc);
if (chunk_is_token(paren_open, CT_PAREN_OPEN))
{
auto close_paren = chunk_skip_to_match(paren_open);
if (close_paren != nullptr)
{
pc = paren_open;
do
{
chunk_flags_set(pc, PCF_IN_DECLTYPE);
pc = pc->next;
} while (pc != close_paren);
return(true);
}
}
}
return(false);
} // mark_cpp_decltype
|