def run(self) -> List[Node]:
    env = self.state.document.settings.env
    if ('cpp:parent_symbol' not in env.temp_data):
        root = env.domaindata['cpp']['root_symbol']
        env.temp_data['cpp:parent_symbol'] = root
        env.ref_context['cpp:parent_key'] = root.get_lookup_key()
    parentSymbol = env.temp_data['cpp:parent_symbol']
    parentDecl = parentSymbol.declaration
    if ((parentDecl is not None) and (parentDecl.objectType == 'function')):
        logger.warning((('C++ declarations inside functions are not supported.' + ' Parent function is ') + str(parentSymbol.get_full_nested_name())), location=self.get_source_info())
        name = _make_phony_error_name()
        symbol = parentSymbol.add_name(name)
        env.temp_data['cpp:last_symbol'] = symbol
        return []
    env.temp_data['cpp:last_symbol'] = None
    return super().run()
def run(self) -> List[Node]:
    env = self.state.document.settings.env
    if ('cpp:parent_symbol' not in env.temp_data):
        root = env.domaindata['cpp']['root_symbol']
        env.temp_data['cpp:parent_symbol'] = root
        env.ref_context['cpp:parent_key'] = root.get_lookup_key()
    parentSymbol = env.temp_data['cpp:parent_symbol']
    parentDecl = parentSymbol.declaration
    if ((parentDecl is not None) and (parentDecl.objectType == 'function')):
        logger.warning((('C++ declarations inside functions are not supported.' + ' Parent function is ') + str(parentSymbol.get_full_nested_name())), location=self.get_source_info())
        name = _make_phony_error_name()
        symbol = parentSymbol.add_name(name)
        env.temp_data['cpp:last_symbol'] = symbol
        return []
    env.temp_data['cpp:last_symbol'] = None
    return super().run()