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

Some comments aren't removed #2

Open
AlCash07 opened this issue Jun 1, 2017 · 5 comments
Open

Some comments aren't removed #2

AlCash07 opened this issue Jun 1, 2017 · 5 comments

Comments

@AlCash07
Copy link
Contributor

AlCash07 commented Jun 1, 2017

Comments in global namespace aren't removed, and I didn't find an option to change this behavior. Comments inside classes that are at least partially inlined are also affected.

@slycelote
Copy link
Owner

You should probably clarify exact scenarios when it happens. Doxygen or, with -fparse-all-comments, 'almost Doxygen' comments attached to unused declarations definitely get removed. I know that trailing comments don't. Anything else?

@AlCash07
Copy link
Contributor Author

AlCash07 commented Jun 3, 2017

In the following example both comments aren't removed without -fparse-all-comments, and with this option the one inside class is removed: http://ideone.com/BSoOtw. Looks like, standalone comments are always ignored.

@slycelote
Copy link
Owner

The first comment is removed with -fparse-all-comments or if it is changed to doxygen style, as expected. The second comment is not removed because it is attached to a used function.

@AlCash07
Copy link
Contributor Author

AlCash07 commented Jun 4, 2017

I think it would make sense to attach a comment to a function only if there are no empty lines between them.

@slycelote
Copy link
Owner

I believe that's how Doxygen and, by extension, clang parser works. Could probably be hacked around but I don't think it's worth it.

@slycelote slycelote changed the title Comments aren't removed Some comments aren't removed Jun 18, 2017
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

2 participants