summaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-20 14:36:46 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-20 14:36:46 +0000
commitf778e503a5409814425be12cdd9721b3e7b0fed5 (patch)
treee9e719aafb0644febd2b61d586b0ac4595d5db90 /gcc/cp/ChangeLog
parent9f7481c9b5313a6e15a1b7e8a9c1410328e60076 (diff)
downloadgcc-f778e503a5409814425be12cdd9721b3e7b0fed5.tar.gz
C++: fix fix-it hints for misspellings within explicit namespaces
gcc/cp/ChangeLog: PR c++/77829 PR c++/78656 * cp-tree.h (suggest_alternatives_for): Add bool param. (suggest_alternative_in_explicit_scope): New decl. * error.c (qualified_name_lookup_error): When SCOPE is a namespace that isn't the global one, call new function suggest_alternative_in_explicit_scope, only calling suggest_alternatives_for if it fails, and disabling near match searches fort that case. When SCOPE is the global namespace, pass true for new param to suggest_alternatives_for to allow for fuzzy name lookups. * lex.c (unqualified_name_lookup_error): Pass true for new param to suggest_alternatives_for. * name-lookup.c (consider_binding_level): Add forward decl. (suggest_alternatives_for): Add "suggest_misspellings" param, using it to conditionalize the fuzzy name-lookup code. (suggest_alternative_in_explicit_scope): New function. * parser.c (cp_parser_primary_expression): When calling finish_id_expression, pass location of id_expression rather than that of id_expr_token. (cp_parser_id_expression): Convert local "unqualified_id" from tree to cp_expr to avoid implicitly dropping location information. gcc/testsuite/ChangeLog: PR c++/77829 PR c++/78656 * g++.dg/spellcheck-pr77829.C: New test case. * g++.dg/spellcheck-pr78656.C: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/ChangeLog')
-rw-r--r--gcc/cp/ChangeLog25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6554cb7cc75..9b71c90f742 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,28 @@
+2017-01-20 David Malcolm <dmalcolm@redhat.com>
+
+ PR c++/77829
+ PR c++/78656
+ * cp-tree.h (suggest_alternatives_for): Add bool param.
+ (suggest_alternative_in_explicit_scope): New decl.
+ * error.c (qualified_name_lookup_error): When SCOPE is a namespace
+ that isn't the global one, call new function
+ suggest_alternative_in_explicit_scope, only calling
+ suggest_alternatives_for if it fails, and disabling near match
+ searches fort that case. When SCOPE is the global namespace,
+ pass true for new param to suggest_alternatives_for to allow for
+ fuzzy name lookups.
+ * lex.c (unqualified_name_lookup_error): Pass true for new param
+ to suggest_alternatives_for.
+ * name-lookup.c (consider_binding_level): Add forward decl.
+ (suggest_alternatives_for): Add "suggest_misspellings" param,
+ using it to conditionalize the fuzzy name-lookup code.
+ (suggest_alternative_in_explicit_scope): New function.
+ * parser.c (cp_parser_primary_expression): When calling
+ finish_id_expression, pass location of id_expression rather
+ than that of id_expr_token.
+ (cp_parser_id_expression): Convert local "unqualified_id" from
+ tree to cp_expr to avoid implicitly dropping location information.
+
2017-01-20 Marek Polacek <polacek@redhat.com>
PR c/64279