aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/ASTContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/ASTContext.h')
-rw-r--r--include/clang/AST/ASTContext.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 517c25df24..468343d2a0 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -993,6 +993,18 @@ public:
return getExtQualType(T, Qs);
}
+ /// getLifetimeQualifiedType - Returns a type with the given
+ /// lifetime qualifier.
+ QualType getLifetimeQualifiedType(QualType type,
+ Qualifiers::ObjCLifetime lifetime) {
+ assert(type.getObjCLifetime() == Qualifiers::OCL_None);
+ assert(lifetime != Qualifiers::OCL_None);
+
+ Qualifiers qs;
+ qs.addObjCLifetime(lifetime);
+ return getQualifiedType(type, qs);
+ }
+
DeclarationNameInfo getNameForTemplate(TemplateName Name,
SourceLocation NameLoc) const;
@@ -1044,7 +1056,9 @@ public:
/// isObjCNSObjectType - Return true if this is an NSObject object with
/// its NSObject attribute set.
- bool isObjCNSObjectType(QualType Ty) const;
+ static bool isObjCNSObjectType(QualType Ty) {
+ return Ty->isObjCNSObjectType();
+ }
//===--------------------------------------------------------------------===//
// Type Sizing and Analysis