libcpp: add callback for comment-handling
commit7b921e0b98f0d5b8424f1bc9111a9c441d887c39
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jun 2017 20:53:06 +0000 (5 20:53 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jun 2017 20:53:06 +0000 (5 20:53 +0000)
treed602be4faec521df3252fd78c8aaab8cd7f563d7
parentcbea241b6a6d1a21ddd9450e322e1f819b48adc8
libcpp: add callback for comment-handling

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248901 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/plugin/comment_plugin.c [new file with mode: 0644]
gcc/testsuite/g++.dg/plugin/comments-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/plugin/plugin.exp
libcpp/ChangeLog
libcpp/include/cpplib.h
libcpp/lex.c