public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3195] c++: Use VAR_OR_FUNCTION_DECL_P.
@ 2020-09-14 19:01 Marek Polacek
0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2020-09-14 19:01 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cd6743e9c412b35e4ec7d8ebd7df8b0eeece3f01
commit r11-3195-gcd6743e9c412b35e4ec7d8ebd7df8b0eeece3f01
Author: Marek Polacek <polacek@redhat.com>
Date: Mon Sep 14 14:49:31 2020 -0400
c++: Use VAR_OR_FUNCTION_DECL_P.
gcc/cp/ChangeLog:
* pt.c (push_template_decl_real): Use VAR_OR_FUNCTION_DECL_P.
Diff:
---
gcc/cp/pt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 8124efcbe24..c630ef5a070 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6072,8 +6072,7 @@ push_template_decl_real (tree decl, bool is_friend)
if (is_primary)
retrofit_lang_decl (decl);
if (DECL_LANG_SPECIFIC (decl)
- && ((TREE_CODE (decl) != VAR_DECL
- && TREE_CODE (decl) != FUNCTION_DECL)
+ && (!VAR_OR_FUNCTION_DECL_P (decl)
|| !ctx
|| !DECL_LOCAL_DECL_P (decl)))
DECL_TEMPLATE_INFO (decl) = info;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-14 19:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 19:01 [gcc r11-3195] c++: Use VAR_OR_FUNCTION_DECL_P Marek Polacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).