aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constraint.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-10-24 18:04:01 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-10-24 18:04:01 +0200
commit86287716e8edba8da03305250e02e23eedc0d754 (patch)
tree4162746b9bc8ce44af52f51250d517ce50e09dc2 /gcc/cp/constraint.cc
parenta3f6007cbc84242c088097e46602a65f9654a349 (diff)
downloadgcc-86287716e8edba8da03305250e02e23eedc0d754.zip
gcc-86287716e8edba8da03305250e02e23eedc0d754.tar.gz
gcc-86287716e8edba8da03305250e02e23eedc0d754.tar.bz2
cxx-pretty-print.c (pp_cxx_check_constraint): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL.
* cxx-pretty-print.c (pp_cxx_check_constraint): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL. * constraint.cc (get_concept_definition): Likewise. (finish_shorthand_constraint): Likewise. * init.c (warn_placement_new_too_small): Likewise. * cp-gimplify.c (cp_genericize_r): Likewise. From-SVN: r241480
Diffstat (limited to 'gcc/cp/constraint.cc')
-rw-r--r--gcc/cp/constraint.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index b4d85c9..801f5a3 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -509,7 +509,7 @@ get_variable_initializer (tree var)
tree
get_concept_definition (tree decl)
{
- if (TREE_CODE (decl) == VAR_DECL)
+ if (VAR_P (decl))
return get_variable_initializer (decl);
else if (TREE_CODE (decl) == FUNCTION_DECL)
return get_returned_expression (decl);
@@ -1286,10 +1286,8 @@ finish_shorthand_constraint (tree decl, tree constr)
the constraint an expansion. */
tree check;
tree tmpl = DECL_TI_TEMPLATE (con);
- if (TREE_CODE (con) == VAR_DECL)
- {
- check = build_concept_check (tmpl, arg, args);
- }
+ if (VAR_P (con))
+ check = build_concept_check (tmpl, arg, args);
else
{
tree ovl = build_overload (tmpl, NULL_TREE);