Move macro-spellchecking code from "gcc" to new files in c-family
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 6 Dec 2017 19:56:11 +0000 (19:56 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 6 Dec 2017 19:56:11 +0000 (19:56 +0000)
commit613bc14fcd3f6b58289aca9a2980cacfc2e75299
treeadf0978b4aae44dff2d6b8e753023d32a03d9960
parent06f9708454a5e644b1fb5ed17a863cd624985e17
Move macro-spellchecking code from "gcc" to new files in c-family

The code for spellchecking macros really belongs in c-family, rather
than in gcc/spellcheck-tree.c, so this patch moves it there.

gcc/ChangeLog:
* Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
* spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
c-family/c-spellcheck.cc.
(best_macro_match::best_macro_match): Likewise.
* spellcheck-tree.h
(struct edit_distance_traits<cpp_hashnode *>): Move to
c-family/c-spellcheck.h.
(class best_macro_match): Likewise.

gcc/c-family/ChangeLog:
* c-spellcheck.cc: New file, taken from macro-handling code in
spellcheck-tree.c.
* c-spellcheck.h: New file, taken from macro-handling code in
spellcheck-tree.h.

gcc/c/ChangeLog:
* c-decl.c: Include "c-family/c-spellcheck.h".

gcc/cp/ChangeLog:
* name-lookup.c: Include "c-family/c-spellcheck.h".

From-SVN: r255452
gcc/ChangeLog
gcc/Makefile.in
gcc/c-family/ChangeLog
gcc/c-family/c-spellcheck.cc [new file with mode: 0644]
gcc/c-family/c-spellcheck.h [new file with mode: 0644]
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/spellcheck-tree.c
gcc/spellcheck-tree.h