File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2555,8 +2555,6 @@ Function::Function(const Token *tok,
25552555 if (::isOperator (tokenDef)) {
25562556 isOperator (true );
25572557
2558- isExplicit (tokenDef->strAt (-1 ) == " explicit" || tokenDef->strAt (-2 ) == " explicit" );
2559-
25602558 // 'operator =' is special
25612559 if (tokenDef->str () == " operator=" )
25622560 type = FunctionType::eOperatorEqual;
@@ -2580,8 +2578,6 @@ Function::Function(const Token *tok,
25802578 // constructor of any kind
25812579 else
25822580 type = FunctionType::eConstructor;
2583-
2584- isExplicit (tokenDef->strAt (-1 ) == " explicit" || tokenDef->strAt (-2 ) == " explicit" );
25852581 }
25862582
25872583 const Token *tok1 = setFlags (tok, scope);
@@ -2655,6 +2651,12 @@ Function::Function(const Token *tok,
26552651 isInline (true );
26562652 hasBody (true );
26572653 }
2654+
2655+ for (tok = tokenDef->previous (); Token::Match (tok, " &|&&|*|::|)|[|(|]|%name%" ); tok = tok->previous ()) {
2656+ // We should set other keywords here as well
2657+ if (tok->str () == " explicit" )
2658+ isExplicit (true );
2659+ }
26582660}
26592661
26602662Function::Function (const Token *tokenDef, const std::string &clangType)
You can’t perform that action at this time.
0 commit comments