From 2ff9b4c7c8fed9233a0b8de2e9507368c451aab6 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 17 Aug 2008 13:24:01 +0000 Subject: [PATCH] Type::isIntegerType() returns true for types between Bool and LongLong. Put WChar between them to make it integer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54882 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Type.h | 5 ++--- test/SemaCXX/wchar_t.cpp | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 502b387ac2..73cf7ca4db 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -471,14 +471,13 @@ public: Char_S, // This is 'char' for targets where char is signed. SChar, // This is explicitly qualified signed char. + WChar, // This is 'wchar_t' for C++. Short, Int, Long, LongLong, - Float, Double, LongDouble, - - WChar // This is 'wchar_t' for C++. + Float, Double, LongDouble }; private: Kind TypeKind; diff --git a/test/SemaCXX/wchar_t.cpp b/test/SemaCXX/wchar_t.cpp index 43dd6ee994..e3cd77a195 100644 --- a/test/SemaCXX/wchar_t.cpp +++ b/test/SemaCXX/wchar_t.cpp @@ -5,4 +5,5 @@ void f(wchar_t p) { wchar_t x; unsigned wchar_t y; // expected-warning {{'wchar_t' cannot be signed or unsigned}} signed wchar_t z; // expected-warning {{'wchar_t' cannot be signed or unsigned}} + ++x; } -- 2.40.0