[Bug c++/84269] More suggestions for missing #include
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 29 20:44:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84269
--- Comment #12 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Thu Mar 29 20:43:48 2018
New Revision: 258966
URL: https://gcc.gnu.org/viewcvs?rev=258966&root=gcc&view=rev
Log:
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>.
Added:
trunk/gcc/testsuite/g++.dg/lookup/missing-std-include-6.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/known-headers.cc
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/lookup/missing-std-include.C
trunk/gcc/testsuite/g++.dg/spellcheck-reswords.C
trunk/gcc/testsuite/g++.dg/spellcheck-stdlib.C
More information about the Gcc-bugs
mailing list