diff options
author | David Malcolm <dmalcolm@redhat.com> | 2017-07-14 15:09:00 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2017-07-14 15:09:00 +0000 |
commit | eea77d1f3437366004a5d47efdf6b9cdbf3fcfbb (patch) | |
tree | 91bce65baf3294434588bd452b06ed508518e076 /gcc/tree-data-ref.h | |
parent | bcf198440546aa583cf86ddce458a4bd26f616f0 (diff) | |
download | gcc-eea77d1f3437366004a5d47efdf6b9cdbf3fcfbb.zip gcc-eea77d1f3437366004a5d47efdf6b9cdbf3fcfbb.tar.gz gcc-eea77d1f3437366004a5d47efdf6b9cdbf3fcfbb.tar.bz2 |
c/c++: Add fix-it hints for suggested missing #includes
gcc/c-family/ChangeLog:
* c-common.c (try_to_locate_new_include_insertion_point): New
function.
(per_file_includes_t): New typedef.
(added_includes_t): New typedef.
(added_includes): New variable.
(maybe_add_include_fixit): New function.
* c-common.h (maybe_add_include_fixit): New decl.
gcc/c/ChangeLog:
* c-decl.c (implicitly_declare): When suggesting a missing
#include, provide a fix-it hint.
gcc/cp/ChangeLog:
* name-lookup.c (get_std_name_hint): Add '<' and '>' around
the header names.
(maybe_suggest_missing_header): Update for addition of '<' and '>'
to above. Provide a fix-it hint.
* pt.c: Include "gcc-rich-location.h"
(listify): Attempt to add fix-it hint for missing
#include <initializer_list>.
* rtti.c: Include "gcc-rich-location.h".
(typeid_ok_p): Attempt to add fix-it hint for missing
#include <typeinfo>.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/missing-initializer_list-include.C: New test case.
* g++.dg/lookup/missing-std-include-2.C: New test case.
* g++.dg/lookup/missing-std-include-3.C: New test case.
* g++.dg/rtti/missing-typeinfo-include.C: New test case.
* gcc.dg/missing-header-fixit-1.c: New test case.
* gcc.dg/missing-header-fixit-2.c: New test case.
* gcc.dg/missing-header-fixit-2.h: New header.
From-SVN: r250203
Diffstat (limited to 'gcc/tree-data-ref.h')
0 files changed, 0 insertions, 0 deletions