aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index f055899..b17915f 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2488,3 +2488,15 @@ special_function_p (decl)
return sfk_none;
}
+
+/* Returns non-zero if TYPE is a character type, including wchar_t. */
+
+int
+char_type_p (type)
+ tree type;
+{
+ return (same_type_p (type, char_type_node)
+ || same_type_p (type, unsigned_char_type_node)
+ || same_type_p (type, signed_char_type_node)
+ || same_type_p (type, wchar_type_node));
+}