@@ -1806,6 +1806,14 @@ static bool skipLanguageSpecificKeyword(const QCString &kw)
1806
1806
return g_insideCpp && (kw == " remove" || kw == " set" || kw == " get" );
1807
1807
}
1808
1808
1809
+ static bool isCastKeyword (const QCString &s)
1810
+ {
1811
+ int i=s.find (' <' );
1812
+ if (i==-1 ) return FALSE ;
1813
+ QCString kw = s.left (i).stripWhiteSpace ();
1814
+ return kw==" const_cast" || kw==" static_cast" || kw==" dynamic_cast" || kw==" reinterpret_cast" ;
1815
+ }
1816
+
1809
1817
/* -----------------------------------------------------------------
1810
1818
*/
1811
1819
#undef YY_INPUT
@@ -2619,9 +2627,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
2619
2627
g_name+=yytext+7;
2620
2628
}
2621
2629
<Body,TemplCast>{SCOPENAME}{B}*" <" [^\n \/\-\.\{\" \>\(]*" >" (" ::" {ID})*/{B}* { // A<T> *pt;
2622
- int i=QCString(yytext).find('<');
2623
- QCString kw = QCString(yytext).left(i).stripWhiteSpace();
2624
- if (kw.right(5)==" _cast" && YY_START==Body)
2630
+ if (isCastKeyword(yytext) && YY_START==Body)
2625
2631
{
2626
2632
REJECT;
2627
2633
}
@@ -2651,9 +2657,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
2651
2657
}
2652
2658
<Body>{SCOPETNAME}{B}*" <" [^\n \/\-\.\{\" \>]*" >" /{BN}*" (" |
2653
2659
<Body>{SCOPETNAME}/{BN}*" (" { // a() or c::a() or t<A,B>::a() or A\B\f oo()
2654
- int i=QCString(yytext).find('<');
2655
- QCString kw = QCString(yytext).left(i).stripWhiteSpace();
2656
- if (kw.right(5)==" _cast" && YY_START==Body)
2660
+ if (isCastKeyword(yytext))
2657
2661
{
2658
2662
REJECT;
2659
2663
}
@@ -3068,9 +3072,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
3068
3072
endFontClass ();
3069
3073
}
3070
3074
<MemberCall2,FuncCall>{ID}(({B}*" <" [^\n\[\](){}<>]*" >" )?({B}*" ::" {B}*{ID})?)* {
3071
- int i=QCString (yytext).find (' <' );
3072
- QCString kw = QCString (yytext).left (i).stripWhiteSpace ();
3073
- if (kw.right (5 )==" _cast" )
3075
+ if (isCastKeyword (yytext))
3074
3076
{
3075
3077
REJECT;
3076
3078
}
0 commit comments