/// GCAttrTypesAttr - Returns gc attribute of this type.
inline QualType::GCAttrTypes getObjCGCAttr() const;
+
+ /// isObjCGCWeak true when Type is objc's weak.
+ bool isObjCGCWeak() const {
+ return getObjCGCAttr() == Weak;
+ }
+
+ /// isObjCGCStrong true when Type is objc's strong.
+ bool isObjCGCStrong() const {
+ return getObjCGCAttr() == Strong;
+ }
/// Emit - Serialize a QualType to Bitcode.
void Emit(llvm::Serializer& S) const;
}
ProcessDeclAttributes(NewFD, D);
- if (T.getObjCGCAttr() == QualType::Weak)
+ if (T.isObjCGCWeak())
Diag(Loc, diag::warn_attribute_weak_on_field);
if (D.getInvalidType() || InvalidDecl)