[clang-tools-extra] r351922 - Revert rCTE351921 to fix documentation geneeration.
Stephane Moore via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 22 18:58:59 PST 2019
Author: stephanemoore
Date: Tue Jan 22 18:58:59 2019
New Revision: 351922
URL: http://llvm.org/viewvc/llvm-project?rev=351922&view=rev
Log:
Revert rCTE351921 to fix documentation geneeration.
Original review: https://reviews.llvm.org/D56945
Modified:
clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp
clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.h
clang-tools-extra/trunk/docs/ReleaseNotes.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/objc-property-declaration.rst
Modified: clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp?rev=351922&r1=351921&r2=351922&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp Tue Jan 22 18:58:59 2019
@@ -97,6 +97,14 @@ bool prefixedPropertyNameValid(llvm::Str
}
} // 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;
@@ -137,6 +145,12 @@ void PropertyDeclarationCheck::check(con
<< 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
Modified: clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.h?rev=351922&r1=351921&r2=351922&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.h Tue Jan 22 18:58:59 2019
@@ -10,6 +10,8 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_PROPERTY_DECLARATION_H
#include "../ClangTidy.h"
+#include <string>
+#include <vector>
namespace clang {
namespace tidy {
@@ -25,10 +27,15 @@ namespace objc {
/// http://clang.llvm.org/extra/clang-tidy/checks/objc-property-declaration.html
class PropertyDeclarationCheck : public ClangTidyCheck {
public:
- PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context)
- : ClangTidyCheck(Name, Context) {}
+ PropertyDeclarationCheck(StringRef Name, ClangTidyContext *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
Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=351922&r1=351921&r2=351922&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Tue Jan 22 18:58:59 2019
@@ -73,10 +73,6 @@ Improvements to clang-tidy
Checks for casts of ``absl::Duration`` conversion functions, and recommends
the right conversion function instead.
-- The :option:`Acronyms` and :option:`IncludeDefaultAcronyms` options for the
- :doc:`objc-property-declaration <clang-tidy/checks/objc-property-declaration>`
- check have been removed.
-
Improvements to include-fixer
-----------------------------
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/objc-property-declaration.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/objc-property-declaration.rst?rev=351922&r1=351921&r2=351922&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/objc-property-declaration.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/objc-property-declaration.rst Tue Jan 22 18:58:59 2019
@@ -40,3 +40,15 @@ lowercase letters followed by a '_' to a
@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.
More information about the cfe-commits
mailing list