diff options
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 637061c499..5040b95e09 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -60,6 +60,12 @@ bool Type::isDerivedType() const { } } +bool Type::isClassType() const { + if (const RecordType *RT = dyn_cast<RecordType>(CanonicalType)) + if (RT->getDecl()->getKind() == Decl::Class) + return true; + return false; +} bool Type::isStructureType() const { if (const RecordType *RT = dyn_cast<RecordType>(CanonicalType)) if (RT->getDecl()->getKind() == Decl::Struct) |