]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: handle misspelled concepts and missing #include <concepts>
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 6 Dec 2024 16:33:59 +0000 (11:33 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 6 Dec 2024 16:33:59 +0000 (11:33 -0500)
commit31c08879dcc750275a59d73aefe2e1fc4ed4957d
tree97d12a47167322fca66f62251fa93fbe110340a1
parent4f5b7f1b738f7206402d008e52718abfd78e2a07
c++: handle misspelled concepts and missing #include <concepts>

gcc/cp/ChangeLog:
* name-lookup.cc (suggest_alternative_in_explicit_scope):
Gracefully handle non-namespaces, such as scoped enums.
* parser.cc (cp_parser_name_lookup_error): Provide
a name_hint for the case where we're in an explicit scope.
* std-name-hint.gperf: Add <concepts>.
* std-name-hint.h: Regenerate.

gcc/testsuite/ChangeLog:
* g++.dg/concepts/missing-header.C: New test.
* g++.dg/concepts/misspelled-concept.C: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/cp/name-lookup.cc
gcc/cp/parser.cc
gcc/cp/std-name-hint.gperf
gcc/cp/std-name-hint.h
gcc/testsuite/g++.dg/concepts/missing-header.C [new file with mode: 0644]
gcc/testsuite/g++.dg/concepts/misspelled-concept.C [new file with mode: 0644]