diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp index fd15df9dea1..cafeac42ba1 100644 --- a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp +++ b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp @@ -217,6 +217,12 @@ void PropertyDeclarationCheck::check(const MatchFinder::MatchResult &Result) { assert(MatchedDecl->getName().size() > 0); auto *DeclContext = MatchedDecl->getDeclContext(); auto *CategoryDecl = llvm::dyn_cast<ObjCCategoryDecl>(DeclContext); + + auto AcronymsRegex = + llvm::Regex("^" + AcronymsGroupRegex(EscapedAcronyms) + "$"); + if (AcronymsRegex.match(MatchedDecl->getName())) { + return; + } if (CategoryDecl != nullptr && hasCategoryPropertyPrefix(MatchedDecl->getName())) { if (!prefixedPropertyNameValid(MatchedDecl->getName(), EscapedAcronyms) || |