diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2013-03-22 03:55:51 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2013-03-22 03:55:51 +0000 |
commit | 9dc6f476cea37cef0802c02e0914f9583dd0206c (patch) | |
tree | c508723a4bc62e4868f5b9b447ddc497eba95417 /gcc/cp/call.c | |
parent | 35054b15e4f9517aa0f63bae3048ab4fa183d4b2 (diff) | |
download | gcc-9dc6f476cea37cef0802c02e0914f9583dd0206c.zip gcc-9dc6f476cea37cef0802c02e0914f9583dd0206c.tar.gz gcc-9dc6f476cea37cef0802c02e0914f9583dd0206c.tar.bz2 |
cp-tree.h (identifier_p): New.
* cp-tree.h (identifier_p): New.
* call.c: Throughout, call identifier_p insstead of direct
comparaison of TREE_CODE against IDENTIFIER_NODE.
* decl.c: Likewisse.
* decl2.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
From-SVN: r196897
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 87fbb2e..dd19e48 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -233,7 +233,7 @@ check_dtor_name (tree basetype, tree name) name = TREE_TYPE (name); else if (TYPE_P (name)) /* OK */; - else if (TREE_CODE (name) == IDENTIFIER_NODE) + else if (identifier_p (name)) { if ((MAYBE_CLASS_TYPE_P (basetype) && name == constructor_name (basetype)) @@ -3147,7 +3147,7 @@ print_z_candidate (location_t loc, const char *msgstr, : ACONCAT ((msgstr, " ", NULL))); location_t cloc = location_of (candidate->fn); - if (TREE_CODE (candidate->fn) == IDENTIFIER_NODE) + if (identifier_p (candidate->fn)) { cloc = loc; if (candidate->num_convs == 3) @@ -8563,8 +8563,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn, - do not have the same parameter type list as any non-template non-member candidate. */ - if (TREE_CODE (cand1->fn) == IDENTIFIER_NODE - || TREE_CODE (cand2->fn) == IDENTIFIER_NODE) + if (identifier_p (cand1->fn) || identifier_p (cand2->fn)) { for (i = 0; i < len; ++i) if (!same_type_p (cand1->convs[i]->type, @@ -8575,7 +8574,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn, if (cand1->fn == cand2->fn) /* Two built-in candidates; arbitrarily pick one. */ return 1; - else if (TREE_CODE (cand1->fn) == IDENTIFIER_NODE) + else if (identifier_p (cand1->fn)) /* cand1 is built-in; prefer cand2. */ return -1; else |