Skip to content
  • Igor Kushnir's avatar
    Fix Visitor::setDeclData(CXCursor, MacroDefinition*) · 902bc682
    Igor Kushnir authored
    The following mistakes were present in the old code:
    1) a tab or a comment after a macro identifier was not considered;
    2) a space was considered mandatory after ')'.
    
    In practice, this lead to bugs specified in the table below. The first
    column is the parsed macro code. The second and third columns - the text
    after "Body: " in the macro's tooltip before and at this commit
    respectively.
     C++ code                   Body before     Body at
     #define m(x)x              m(x)x           x
     #define m(x)long x         ong x           long x
     #define m(x)/*A*/x         m(x)/*A*/x      /*A*/x
     #define m/*o*/long         m/*o*/long      /*o*/long
     #define m/*(x)*/ long      / long          /*(x)*/ long
    902bc682