libcpp: add callback for comment-handling

Programming / Compilers / GCC - dmalcolm [138bc75d-0d04-0410-961f-82ee72b054a4] - 5 June 2017 16:53 EDT

gcc/testsuite/ChangeLog:
- g++.dg/plugin/comment_plugin.c: New test plugin.
- g++.dg/plugin/comments-1.C: New test file.
- g++.dg/plugin/plugin.exp (plugin_test_list): Add the above.

libcpp/ChangeLog:
- include/cpplib.h (struct cpp_callbacks): Add "comment" callback.
- lex.c (_cpp_lex_direct): Call the comment callback if non-NULL.

7b921e0 libcpp: add callback for comment-handling
gcc/testsuite/ChangeLog | 6 +++
gcc/testsuite/g++.dg/plugin/comment_plugin.c | 63 ++++++++++++++++++++++++++++
gcc/testsuite/g++.dg/plugin/comments-1.C | 49 ++++++++++++++++++++++
gcc/testsuite/g++.dg/plugin/plugin.exp | 1 +
libcpp/ChangeLog | 6 +++
libcpp/include/cpplib.h | 9 ++++
libcpp/lex.c | 7 ++++
7 files changed, 141 insertions(+)

Upstream: gcc.gnu.org


  • Share