diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-05-01 20:53:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-05-01 20:53:21 +0000 |
commit | a3ae52b63aff9d4478084e40b1f683f45eb06ab7 (patch) | |
tree | fd101b6df82cb56b1599a95aba528c79ef07b2db /include | |
parent | bcbf872e857d804a46559b8b2289306d1fab3f3b (diff) |
[documenting declaration]: Remove arc liftime qualifiers
when doccumenting declrations in comments.
// rdar://13757500
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/ASTContext.h | 13 | ||||
-rw-r--r-- | include/clang/AST/Type.h | 9 |
2 files changed, 12 insertions, 10 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index c56f7a830e..65f29c4815 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -1452,7 +1452,18 @@ public: qs.addObjCLifetime(lifetime); return getQualifiedType(type, qs); } - + + /// getUnqualifiedObjCPointerType - Returns version of + /// Objective-C pointer type with lifetime qualifier removed. + QualType getUnqualifiedObjCPointerType(QualType type) const { + if (!type.getTypePtr()->isObjCObjectPointerType() || + !type.getQualifiers().hasObjCLifetime()) + return type; + Qualifiers Qs = type.getQualifiers(); + Qs.removeObjCLifetime(); + return getQualifiedType(type.getUnqualifiedType(), Qs); + } + DeclarationNameInfo getNameForTemplate(TemplateName Name, SourceLocation NameLoc) const; diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 67188c1c73..39f10d3393 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -853,10 +853,6 @@ 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) { @@ -4651,11 +4647,6 @@ 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()) |