diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/Type.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 8d0602254b..67188c1c73 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -853,6 +853,10 @@ public: return *this; } + /// getUnqualifiedObjCPointerType - Returns the unqualified version if + /// Objective-C pointer type; otherwise, returns type as is. + inline QualType getUnqualifiedObjCPointerType() const; + /// operator==/!= - Indicate whether the specified types and qualifiers are /// identical. friend bool operator==(const QualType &LHS, const QualType &RHS) { @@ -4648,6 +4652,11 @@ inline QualType QualType::getUnqualifiedType() const { return QualType(getSplitUnqualifiedTypeImpl(*this).Ty, 0); } +inline QualType QualType::getUnqualifiedObjCPointerType() const { + return getTypePtr()->isObjCObjectPointerType() ? + getUnqualifiedType() : *this; +} + inline SplitQualType QualType::getSplitUnqualifiedType() const { if (!getTypePtr()->getCanonicalTypeInternal().hasLocalQualifiers()) return split(); @@ -4679,7 +4688,7 @@ inline void QualType::removeLocalCVRQualifiers(unsigned Mask) { inline unsigned QualType::getAddressSpace() const { return getQualifiers().getAddressSpace(); } - + /// getObjCGCAttr - Return the gc attribute of this type. inline Qualifiers::GC QualType::getObjCGCAttr() const { return getQualifiers().getObjCGCAttr(); |