Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Irony auto-complete for structure with macro inside #572

Open
wanghaiqiangk opened this issue Oct 27, 2020 · 0 comments
Open

Irony auto-complete for structure with macro inside #572

wanghaiqiangk opened this issue Oct 27, 2020 · 0 comments

Comments

@wanghaiqiangk
Copy link

The definition of struct sigaction is

struct sigaction
  {
    /* Signal handler.  */
#ifdef __USE_POSIX199309
    union
      {
	/* Used if SA_SIGINFO is not set.  */
	__sighandler_t sa_handler;
	/* Used if SA_SIGINFO is set.  */
	void (*sa_sigaction) (int, siginfo_t *, void *);
      }
    __sigaction_handler;
# define sa_handler	__sigaction_handler.sa_handler
# define sa_sigaction	__sigaction_handler.sa_sigaction
#else
    __sighandler_t sa_handler;
#endif

    /* Additional set of signals to be blocked.  */
    __sigset_t sa_mask;

    /* Special flags.  */
    int sa_flags;

    /* Restore handler.  */
    void (*sa_restorer) (void);
  };

Without special requirement or using obsolescent compiler, the compiler usually chooses the #else so that sa_handler is one of members.

But irony doesn't show any candidates for sa_handler, my irony gives
image

There are duplicated items for the same candidate. That's because I'm using both irony and rtags. Both of them don't show sa_handler. But since they use clang as backend. I suspect it is a problem of clang, isn't it? There is another possible reason that I can come up with, that is there may be an option about compiler definition which should be given to irony but omitted.

Can anyone help? Thank ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant