More #include suggestions (PR c++/84269)
commit57607963bcceee73907726f7cb57c4cd043a5132
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Mar 2018 20:43:48 +0000 (29 20:43 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Mar 2018 20:43:48 +0000 (29 20:43 +0000)
tree9d01cf6e271276c71032bebae47e9ab8a33c3548
parent9830757214ad3aa465d0661b38e9ea7dd868d0ae
More #include suggestions (PR c++/84269)

PR c++/84269 reports a number of names in the C and C++ standard
libraries for which we don't yet offer #include fix-it hints.

This patch adds them (up to comment #9).

gcc/c-family/ChangeLog:
PR c++/84269
* known-headers.cc (get_stdlib_header_for_name): Add various names
from <assert.h>, <string.h>, and <memory.h>; add more names from
<stdio.h>.

gcc/cp/ChangeLog:
PR c++/84269
* name-lookup.c (get_std_name_hint): Add names from <memory>,
<tuple>, and <utility>.

gcc/testsuite/ChangeLog:
PR c++/84269
* g++.dg/lookup/missing-std-include-6.C: New test.
* g++.dg/lookup/missing-std-include.C: Add std::pair and
std::tuple tests.
* g++.dg/spellcheck-reswords.C: Expect a hint about <cstring>.
* g++.dg/spellcheck-stdlib.C: Add tests for names in <cstdio>,
<cstring>, <cassert>, and <cstdlib>.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258966 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c-family/ChangeLog
gcc/c-family/known-headers.cc
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/missing-std-include-6.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lookup/missing-std-include.C
gcc/testsuite/g++.dg/spellcheck-reswords.C
gcc/testsuite/g++.dg/spellcheck-stdlib.C