-
Notifications
You must be signed in to change notification settings - Fork 632
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
Macro definitions missing in tags file #1514
Comments
Reproduced. |
CPreProcessor must be added to --languages.
|
Confirmed that this fixes it for me. User error, but not an obvious solution. I am not sure what should be changed either. |
At leat this must be written in man/ctags-incompatibilities.7. |
Thank you for reporting. |
masatake
added a commit
to masatake/ctags
that referenced
this issue
Oct 1, 2017
Old behavior: When --language=C++ is specified, C preprocessor macro definitions in a source code is not captured. Because CPreProcessor parser captures the definitions and is disabled with --language=C++ option. As reported in universal-ctags#1514, this behavior makes use confused. $ ./ctags --list-kinds=C++ d macro definitions e enumerators (values inside an enumeration) f function definitions Though CPreProcessor parser captures macro definitions, macro kind is listed in --list-kinds=C++. A user may understand "macro kind" is part of C++ parser, and the understanding looks reasonable. New behavior: In the following condition, CPreProcessor related kind language objects are recorded even if CPreProcessor is disabled: The kinds are listed in --list-kinds output of a parser, that uses CPreProcessor parser. C and C++ meet the condition. DTS doesn't meet the condition. Close universal-ctags#1514. Signed-off-by: Masatake YAMATO <[email protected]>
I understand how critical this bug is. In #1564, I implement the behaviour you expected. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I make a simple .cpp file containing one line:
Then, running
ctags --languages=c++ test.cpp
I get this output:I do not get a tag for my macro. This is true even if I use
--kinds-c++=+d
, even though it is enabled by default.Here is the output of
ctags --version
The text was updated successfully, but these errors were encountered: