diff options
-rw-r--r-- | include/clang/AST/Type.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index c24bddb300..b5f0c47e7f 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -835,6 +835,9 @@ public: /// Helper methods to distinguish type categories. All type predicates /// operate on the canonical type, ignoring typedefs and qualifiers. + /// isBuiltinType - returns true if the type is a builtin type. + bool isBuiltinType() const; + /// isSpecificBuiltinType - Test for a particular builtin type. bool isSpecificBuiltinType(unsigned K) const; @@ -3454,6 +3457,10 @@ inline bool Type::isTemplateTypeParmType() const { return isa<TemplateTypeParmType>(CanonicalType); } +inline bool Type::isBuiltinType() const { + return getAs<BuiltinType>(); +} + inline bool Type::isSpecificBuiltinType(unsigned K) const { if (const BuiltinType *BT = getAs<BuiltinType>()) if (BT->getKind() == (BuiltinType::Kind) K) |