aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/DeclarationFragments.cpp
diff options
context:
space:
mode:
authorUsman Akinyemi <usmanakinyemi202@gmail.com>2023-04-04 09:58:03 -0700
committerZixu Wang <zixu_wang@apple.com>2023-04-04 10:00:34 -0700
commit32b53cf9d0c8c0e01ce5b0e7d5c717202a98cdf5 (patch)
tree425c4b8d2e75a5ccadca44425f24c87302154857 /clang/lib/ExtractAPI/DeclarationFragments.cpp
parent787648989e8ac380b392bd1047ac309475fdcb90 (diff)
downloadllvm-32b53cf9d0c8c0e01ce5b0e7d5c717202a98cdf5.zip
llvm-32b53cf9d0c8c0e01ce5b0e7d5c717202a98cdf5.tar.gz
llvm-32b53cf9d0c8c0e01ce5b0e7d5c717202a98cdf5.tar.bz2
[ExtractAPI] Remove extra attributes in property declaration fragments
Use `getPropertyAttributesAsWritten` instead of `getPropertyAttributes` to get property attributes actually specified in the source code. Resolves issue #61478. https://reviews.llvm.org/D146759 Reviewed By: zixuw, dang Differential Revision: https://reviews.llvm.org/D146759
Diffstat (limited to 'clang/lib/ExtractAPI/DeclarationFragments.cpp')
-rw-r--r--clang/lib/ExtractAPI/DeclarationFragments.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/ExtractAPI/DeclarationFragments.cpp b/clang/lib/ExtractAPI/DeclarationFragments.cpp
index 912e58a..da75a701b 100644
--- a/clang/lib/ExtractAPI/DeclarationFragments.cpp
+++ b/clang/lib/ExtractAPI/DeclarationFragments.cpp
@@ -638,7 +638,7 @@ DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCProperty(
// Build the Objective-C property keyword.
Fragments.append("@property", DeclarationFragments::FragmentKind::Keyword);
- const auto Attributes = Property->getPropertyAttributes();
+ const auto Attributes = Property->getPropertyAttributesAsWritten();
// Build the attributes if there is any associated with the property.
if (Attributes != ObjCPropertyAttribute::kind_noattr) {
// No leading comma for the first attribute.