2015-03-22 Andrew Sutton <andrew.n.sutton@gmail.com>
commit08f0cba5f6fd6a8c90176b191da0d92e71f275bf
authorasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Mar 2015 17:24:05 +0000 (22 17:24 +0000)
committerasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Mar 2015 17:24:05 +0000 (22 17:24 +0000)
treed60491faf56f7df31c540c9164854e6d364e35d0
parent7316c2af8e5dc2dd311405d8aa8c49383378a242
2015-03-22  Andrew Sutton  <andrew.n.sutton@gmail.com>

  Fix regression related to variadic templates, bugs in
  the handling of access checking, and in the logic solver.
  * gcc/cp/constraint.cc (declare_constraint_vars): Mark
  constraint variables.
  (deferring_access_check_sentinel): Make this a local class
  of check_expression_constraint.
  (check_type_constraint): Don't defer access checks. Instead
  pop deferred access checks if they fail.
  (finish_requires_expr): Mark constraint variables.
  * gcc/cp/cp-tree.h (CONSTRAINT_VAR_P): Indicates if a
  parameter is a constraint variable.
  * gcc/cp/pt.c (pending_expansion_p): New. Helps determine
  if a parameter will be expanded during substitution.
  (tsubst_pack_expansion): For certain expressions pending
  expansion, do that here.
  (tsubst_decl): Remove dead code.
  (tsubst_copy_and_build): Don't add arguments that are
  pending expansion. Also, don't build expansion when the
  type is dependent. This was causing a regression in
  non-concepts code.
  * gcc/cp/logic.cc (proof_state::branch): Don't rely on
  order of operations. This crashed when built with Clang.
  * gcc/testsuite/g++.dg/concepts/expression2.C: Update to
  match diagnostics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/c++-concepts@221571 138bc75d-0d04-0410-961f-82ee72b054a4
ChangeLog.concepts
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/logic.cc
gcc/cp/pt.c
gcc/testsuite/g++.dg/concepts/expression2.C
gcc/testsuite/g++.dg/concepts/expression3.C