diff options
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index d6cf4bd0c3..b5a884085b 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -889,6 +889,12 @@ bool Type::isPromotableIntegerType() const { return false; } +bool Type::isNullPtrType() const { + if (const BuiltinType *BT = getAsBuiltinType()) + return BT->getKind() == BuiltinType::NullPtr; + return false; +} + const char *BuiltinType::getName() const { switch (getKind()) { default: assert(0 && "Unknown builtin type!"); @@ -912,6 +918,7 @@ const char *BuiltinType::getName() const { case Double: return "double"; case LongDouble: return "long double"; case WChar: return "wchar_t"; + case NullPtr: return "nullptr_t"; case Overload: return "<overloaded function type>"; case Dependent: return "<dependent type>"; } |