Skip to content

Commit

Permalink
[clang-tidy] Delete obsolete objc-property-declaration options ✂️
Browse files Browse the repository at this point in the history
Summary:
The Acronyms and IncludeDefaultAcronyms options were deprecated in
https://reviews.llvm.org/D51832. These options can be removed.

Tested by running the clang-tidy tests.

This is an amended resubmission of https://reviews.llvm.org/D56945.

Reviewers: Eugene.Zelenko, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57080

llvm-svn: 354195
  • Loading branch information
stephanemoore committed Feb 16, 2019
1 parent 8f1e3d9 commit 358f99c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 35 deletions.
14 changes: 0 additions & 14 deletions clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp
Expand Up @@ -97,14 +97,6 @@ bool prefixedPropertyNameValid(llvm::StringRef PropertyName) {
}
} // namespace

PropertyDeclarationCheck::PropertyDeclarationCheck(StringRef Name,
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
SpecialAcronyms(
utils::options::parseStringList(Options.get("Acronyms", ""))),
IncludeDefaultAcronyms(Options.get("IncludeDefaultAcronyms", true)),
EscapedAcronyms() {}

void PropertyDeclarationCheck::registerMatchers(MatchFinder *Finder) {
// this check should only be applied to ObjC sources.
if (!getLangOpts().ObjC) return;
Expand Down Expand Up @@ -145,12 +137,6 @@ void PropertyDeclarationCheck::check(const MatchFinder::MatchResult &Result) {
<< generateFixItHint(MatchedDecl, StandardProperty);
}

void PropertyDeclarationCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "Acronyms",
utils::options::serializeStringList(SpecialAcronyms));
Options.store(Opts, "IncludeDefaultAcronyms", IncludeDefaultAcronyms);
}

} // namespace objc
} // namespace tidy
} // namespace clang
11 changes: 2 additions & 9 deletions clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h
Expand Up @@ -10,8 +10,6 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_PROPERTY_DECLARATION_H

#include "../ClangTidy.h"
#include <string>
#include <vector>

namespace clang {
namespace tidy {
Expand All @@ -27,15 +25,10 @@ namespace objc {
/// http://clang.llvm.org/extra/clang-tidy/checks/objc-property-declaration.html
class PropertyDeclarationCheck : public ClangTidyCheck {
public:
PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context);
PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
void storeOptions(ClangTidyOptions::OptionMap &Options) override;

private:
const std::vector<std::string> SpecialAcronyms;
const bool IncludeDefaultAcronyms;
std::vector<std::string> EscapedAcronyms;
};

} // namespace objc
Expand Down
4 changes: 4 additions & 0 deletions clang-tools-extra/docs/ReleaseNotes.rst
Expand Up @@ -98,6 +98,10 @@ Improvements to clang-tidy
`CommentUserDefiniedLiterals`, `CommentStringLiterals`,
`CommentCharacterLiterals` & `CommentNullPtrs` options.

- The `Acronyms` and `IncludeDefaultAcronyms` options for the
:doc:`objc-property-declaration <clang-tidy/checks/objc-property-declaration>`
check have been removed.

Improvements to include-fixer
-----------------------------

Expand Down
Expand Up @@ -40,15 +40,3 @@ lowercase letters followed by a '_' to avoid naming conflict. For example:
@property(nonatomic, assign) int abc_lowerCamelCase;
The corresponding style rule: https://developer.apple.com/library/content/qa/qa1908/_index.html


Options
-------

.. option:: Acronyms

This option is deprecated and ignored.

.. option:: IncludeDefaultAcronyms

This option is deprecated and ignored.

0 comments on commit 358f99c

Please sign in to comment.