aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2020-04-23 02:20:56 -0400
committerPuyan Lotfi <puyan@puyan.org>2020-04-23 17:21:25 -0400
commit9721fbf85b83c1cb67cea542c5558f99a07766cf (patch)
tree2dc3ecc4cd3fa0f73a367db1f97272920d27609e /clang/lib/Sema/SemaChecking.cpp
parentb53fd70b9eccdcd228c26b3e12dc984fe9acf23b (diff)
downloadllvm-9721fbf85b83c1cb67cea542c5558f99a07766cf.zip
llvm-9721fbf85b83c1cb67cea542c5558f99a07766cf.tar.gz
llvm-9721fbf85b83c1cb67cea542c5558f99a07766cf.tar.bz2
[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.
This is a code clean up of the PropertyAttributeKind and ObjCPropertyAttributeKind enums in ObjCPropertyDecl and ObjCDeclSpec that are exactly identical. This non-functional change consolidates these enums into one. The changes are to many files across clang (and comments in LLVM) so that everything refers to the new consolidated enum in DeclObjCCommon.h. 2nd Landing Attempt... Differential Revision: https://reviews.llvm.org/D77233
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 559ad52..126f155 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -13917,12 +13917,12 @@ void Sema::checkUnsafeExprAssigns(SourceLocation Loc,
return;
unsigned Attributes = PD->getPropertyAttributes();
- if (Attributes & ObjCPropertyDecl::OBJC_PR_assign) {
+ if (Attributes & ObjCPropertyAttribute::kind_assign) {
// when 'assign' attribute was not explicitly specified
// by user, ignore it and rely on property type itself
// for lifetime info.
unsigned AsWrittenAttr = PD->getPropertyAttributesAsWritten();
- if (!(AsWrittenAttr & ObjCPropertyDecl::OBJC_PR_assign) &&
+ if (!(AsWrittenAttr & ObjCPropertyAttribute::kind_assign) &&
LHSType->isObjCRetainableType())
return;
@@ -13934,8 +13934,7 @@ void Sema::checkUnsafeExprAssigns(SourceLocation Loc,
}
RHS = cast->getSubExpr();
}
- }
- else if (Attributes & ObjCPropertyDecl::OBJC_PR_weak) {
+ } else if (Attributes & ObjCPropertyAttribute::kind_weak) {
if (checkUnsafeAssignObject(*this, Loc, Qualifiers::OCL_Weak, RHS, true))
return;
}