Fix #680: Add option to keep comments in preprocessed code#681
Fix #680: Add option to keep comments in preprocessed code#681ludviggunne wants to merge 3 commits into
Conversation
danmar
left a comment
There was a problem hiding this comment.
I don't see the use case to treat comments differently in the source file and in included files. do you know the reason?
|
The removeComments was added in #340 and it seems that it was added for performance reasons only, there is no known use case as far as I see when we want to only remove the comments in the included files. So I suggest that we just keep the removeComments flag. If that is false then keep all comments. If that is true the remove all comments. The performance optimisation might be less interesting after Tommys recent fix also so that files are not redundantly loaded. |
41d16e9 to
04b4e45
Compare
|
|
||
| { | ||
| const char code[] = "#define MACRO /* comment */\nMACRO\n"; | ||
| ASSERT_EQUALS("\n/* comment */", preprocess(code,dui)); |
There was a problem hiding this comment.
this may be questionable. do we want that comments are expanded. maybe the comment should only be kept on line 1.
but for now .. as far as I see it does not matter much. If somebody has strong opinions later and wants to change I am not against changing..
No description provided.