aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Type.h
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-05-01 17:28:37 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-05-01 17:28:37 +0000
commitdb1519a95687622d08340f9b7522ef84a53b331a (patch)
tree9391b82d2dfc1fea8a76201e290a7ff0fb9f51b2 /include/clang/AST/Type.h
parent78a2a5a17a907aec58ae6b564607de4202dee0c6 (diff)
downloadclang-db1519a95687622d08340f9b7522ef84a53b331a.tar.gz
[ObjC declaration documentation] declaration of
types involving Objective-C pointers must have their arc qualifiers elided as they don't add any additional info. // rdar://13757500. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r--include/clang/AST/Type.h11
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();