2015-03-20 Andrew Sutton <andrew.n.sutton@gmail.com>
commit86547d4a9ff65b832f5fed2db52f1f66329ff22a
authorasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Mar 2015 17:27:24 +0000 (20 17:27 +0000)
committerasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Mar 2015 17:27:24 +0000 (20 17:27 +0000)
tree60a4f5bda77b42bfb498e7db89973f49f04525b9
parent0a5ec6afbe36caf8d7712dba36a4998d6cc8e2e4
2015-03-20  Andrew Sutton  <andrew.n.sutton@gmail.com>

Fix grammar error type requirements and improve diagnostics
for mis-defined function concepts and errors involving pack
expansions.
* gcc/cp/pt.c (determine_specialization). Remove dead code.
(lookup_template_class_1): Return an error if constraints
aren't satisfied.
* gcc/cp/constraint.cc (lift_function_definition): Don't
re-check for empty/erroneous concept definitions.
(lift_pack_expansion): Removed. Don't inline patterns so
that we can preserve the syntax beneath them.
(lift_expression): Don't do anything with pack expansions.
(check_function_concept): Specifically check for empty
concept definitions.
(diagnose_pack_expansion): Diagnose errors in expansions
more thoughtfully by determining which arguments are failing
their expanded requirements.
gcc/cp/parser.c (cp_parser_type_requirement): Accept an
optional template keyword before a template-id and
parse that as a special case of required type name.
gcc/testsuite/g++.dg/concepts/template-parm11.C: Update test
for fixed grammar, diagnostics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/c++-concepts@221540 138bc75d-0d04-0410-961f-82ee72b054a4
ChangeLog.concepts
gcc/cp/constraint.cc
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/concepts/template-parm11.C