@@ -8528,7 +8528,8 @@ bool ClangASTContext::AddObjCClassProperty(
8528
8528
? class_interface_decl->lookupInstanceMethod (getter_sel)
8529
8529
: class_interface_decl->lookupClassMethod (getter_sel))) {
8530
8530
const bool isVariadic = false ;
8531
- const bool isSynthesized = false ;
8531
+ const bool isPropertyAccessor = false ;
8532
+ const bool isSynthesizedAccessorStub = false ;
8532
8533
const bool isImplicitlyDeclared = true ;
8533
8534
const bool isDefined = false ;
8534
8535
const clang::ObjCMethodDecl::ImplementationControl impControl =
@@ -8539,7 +8540,8 @@ bool ClangASTContext::AddObjCClassProperty(
8539
8540
*clang_ast, clang::SourceLocation (), clang::SourceLocation (),
8540
8541
getter_sel, ClangUtil::GetQualType (property_clang_type_to_access),
8541
8542
nullptr , class_interface_decl, isInstance, isVariadic,
8542
- isSynthesized, isImplicitlyDeclared, isDefined, impControl,
8543
+ isPropertyAccessor, isSynthesizedAccessorStub,
8544
+ isImplicitlyDeclared, isDefined, impControl,
8543
8545
HasRelatedResultType);
8544
8546
8545
8547
if (getter && metadata)
@@ -8560,7 +8562,8 @@ bool ClangASTContext::AddObjCClassProperty(
8560
8562
: class_interface_decl->lookupClassMethod (setter_sel))) {
8561
8563
clang::QualType result_type = clang_ast->VoidTy ;
8562
8564
const bool isVariadic = false ;
8563
- const bool isSynthesized = false ;
8565
+ const bool isPropertyAccessor = true ;
8566
+ const bool isSynthesizedAccessorStub = false ;
8564
8567
const bool isImplicitlyDeclared = true ;
8565
8568
const bool isDefined = false ;
8566
8569
const clang::ObjCMethodDecl::ImplementationControl impControl =
@@ -8570,8 +8573,9 @@ bool ClangASTContext::AddObjCClassProperty(
8570
8573
clang::ObjCMethodDecl *setter = clang::ObjCMethodDecl::Create (
8571
8574
*clang_ast, clang::SourceLocation (), clang::SourceLocation (),
8572
8575
setter_sel, result_type, nullptr , class_interface_decl,
8573
- isInstance, isVariadic, isSynthesized, isImplicitlyDeclared,
8574
- isDefined, impControl, HasRelatedResultType);
8576
+ isInstance, isVariadic, isPropertyAccessor,
8577
+ isSynthesizedAccessorStub, isImplicitlyDeclared, isDefined,
8578
+ impControl, HasRelatedResultType);
8575
8579
8576
8580
if (setter && metadata)
8577
8581
ClangASTContext::SetMetadata (clang_ast, setter, *metadata);
@@ -8673,10 +8677,16 @@ clang::ObjCMethodDecl *ClangASTContext::AddMethodToObjCObjectType(
8673
8677
if (!method_function_prototype)
8674
8678
return nullptr ;
8675
8679
8676
- bool is_synthesized = false ;
8677
- bool is_defined = false ;
8678
- clang::ObjCMethodDecl::ImplementationControl imp_control =
8680
+ const bool isInstance = (name[0 ] == ' -' );
8681
+ const bool isVariadic = false ;
8682
+ const bool isPropertyAccessor = false ;
8683
+ const bool isSynthesizedAccessorStub = false ;
8684
+ // / Force this to true because we don't have source locations.
8685
+ const bool isImplicitlyDeclared = true ;
8686
+ const bool isDefined = false ;
8687
+ const clang::ObjCMethodDecl::ImplementationControl impControl =
8679
8688
clang::ObjCMethodDecl::None;
8689
+ const bool HasRelatedResultType = false ;
8680
8690
8681
8691
const unsigned num_args = method_function_prototype->getNumParams ();
8682
8692
@@ -8692,10 +8702,8 @@ clang::ObjCMethodDecl *ClangASTContext::AddMethodToObjCObjectType(
8692
8702
nullptr , // TypeSourceInfo *ResultTInfo,
8693
8703
ClangASTContext::GetASTContext (ast)->GetDeclContextForType (
8694
8704
ClangUtil::GetQualType (type)),
8695
- name[0 ] == ' -' , is_variadic, is_synthesized,
8696
- true , // is_implicitly_declared; we force this to true because we don't
8697
- // have source locations
8698
- is_defined, imp_control, false /* has_related_result_type*/ );
8705
+ isInstance, isVariadic, isPropertyAccessor, isSynthesizedAccessorStub,
8706
+ isImplicitlyDeclared, isDefined, impControl, HasRelatedResultType);
8699
8707
8700
8708
if (objc_method_decl == nullptr )
8701
8709
return nullptr ;
0 commit comments