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

Semantic not working with C++ standard headers. #704

Open
Markkolas opened this issue Oct 31, 2023 · 1 comment
Open

Semantic not working with C++ standard headers. #704

Markkolas opened this issue Oct 31, 2023 · 1 comment

Comments

@Markkolas
Copy link

Markkolas commented Oct 31, 2023

I have read that semantic has some problems with C++ so I don't know if this is expected behavior.

I added C++ headers dir path with (semantic-add-system-include [path]) and, for example, semantic-ia-fast-jump dosen't recognize C++ standard header files like or (and of course the tags defined in such files). If the header ends with .h (like math.h) the function works correctly and I noted that when applying the function to a include directive with <randomgibberish>, semantic-ia-fast-jump does not complain and just jump to the tag itself.

So I'm guessing that semantic can only process tags as header files only if they end with .h.
Is there any way to make semantic process anything in a include directive as a header file or do I just have to live with it? I may have something wrong with my config tho (I hope not).

Thanks in advance.

EDIT: Seems like if I include C++ system files like #include <./iostream> then semantic-ia-fast-jump jumps to the file correctly. Again, is this normal behavior?

@Markkolas
Copy link
Author

By pure chance I discovered that the jump works properly when the cursor is OVER the #include, the space (if any), or the '<' symbol. If it is in the same line but over the standard library name it does no jump. I won't close the issue just in case this is not expected behavior (which, at least for me, it is not, and if it is, then I find it pretty inconsistent).

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