Skip to content
  • Igor Kushnir's avatar
    ParamIterator: add support for zero parameters: () or <> · f6f07a4f
    Igor Kushnir authored
    The displayed tooltips for macros and identifiers with zero parameters
    were correct even before this commit. For example,
    "Function macro: mempty()" for `#define mempty()`;
    "ClassName< > objectName" for objectName in `ClassName<> objectName;`.
    However the unit tests revealed that the corresponding MacroDefinition
    object contained a single parameter with an empty name. This didn't pose
    any practical problems, but wrong models could cause issues later.
    
    MacroNavigationContext::html() displayed parentheses only if at least
    one parameter existed. In order to keep the tooltip correct (as opposed
    to "Function macro: mempty" for the example above), display parentheses
    if the macro is function-like instead.
    f6f07a4f