aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2020-04-22 17:32:20 -0400
committerPuyan Lotfi <puyan@puyan.org>2020-04-22 23:27:06 -0400
commit2aa044ed088ae41461ad7029c055014df6c60976 (patch)
tree1d3f18ad91af1e81f8b2cdf63646bf0752c1fcbe /clang/lib/Sema/SemaChecking.cpp
parent7b5497f25857c52c514477f0c7cb4e3c26ac1873 (diff)
downloadllvm-2aa044ed088ae41461ad7029c055014df6c60976.zip
llvm-2aa044ed088ae41461ad7029c055014df6c60976.tar.gz
llvm-2aa044ed088ae41461ad7029c055014df6c60976.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. 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;
}