hokein created this revision.
hokein added a reviewer: alexfh.
hokein added a subscriber: cfe-commits.

https://reviews.llvm.org/D23544

Files:
  clang-tidy/readability/ImplicitBoolCastCheck.cpp
  clang-tidy/readability/ImplicitBoolCastCheck.h

Index: clang-tidy/readability/ImplicitBoolCastCheck.h
===================================================================
--- clang-tidy/readability/ImplicitBoolCastCheck.h
+++ clang-tidy/readability/ImplicitBoolCastCheck.h
@@ -28,6 +28,7 @@
             Options.get("AllowConditionalIntegerCasts", 0) != 0),
         AllowConditionalPointerCasts(
             Options.get("AllowConditionalPointerCasts", 0) != 0) {}
+  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
   void registerMatchers(ast_matchers::MatchFinder *Finder) override;
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 
Index: clang-tidy/readability/ImplicitBoolCastCheck.cpp
===================================================================
--- clang-tidy/readability/ImplicitBoolCastCheck.cpp
+++ clang-tidy/readability/ImplicitBoolCastCheck.cpp
@@ -299,6 +299,14 @@
 
 } // anonymous namespace
 
+void ImplicitBoolCastCheck::storeOptions(
+    ClangTidyOptions::OptionMap &Opts) {
+  Options.store(Opts, "AllowConditionalIntegerCasts",
+                AllowConditionalIntegerCasts);
+  Options.store(Opts, "AllowConditionalPointerCasts",
+                AllowConditionalPointerCasts);
+}
+
 void ImplicitBoolCastCheck::registerMatchers(MatchFinder *Finder) {
   // This check doesn't make much sense if we run it on language without
   // built-in bool support.


Index: clang-tidy/readability/ImplicitBoolCastCheck.h
===================================================================
--- clang-tidy/readability/ImplicitBoolCastCheck.h
+++ clang-tidy/readability/ImplicitBoolCastCheck.h
@@ -28,6 +28,7 @@
             Options.get("AllowConditionalIntegerCasts", 0) != 0),
         AllowConditionalPointerCasts(
             Options.get("AllowConditionalPointerCasts", 0) != 0) {}
+  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
   void registerMatchers(ast_matchers::MatchFinder *Finder) override;
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 
Index: clang-tidy/readability/ImplicitBoolCastCheck.cpp
===================================================================
--- clang-tidy/readability/ImplicitBoolCastCheck.cpp
+++ clang-tidy/readability/ImplicitBoolCastCheck.cpp
@@ -299,6 +299,14 @@
 
 } // anonymous namespace
 
+void ImplicitBoolCastCheck::storeOptions(
+    ClangTidyOptions::OptionMap &Opts) {
+  Options.store(Opts, "AllowConditionalIntegerCasts",
+                AllowConditionalIntegerCasts);
+  Options.store(Opts, "AllowConditionalPointerCasts",
+                AllowConditionalPointerCasts);
+}
+
 void ImplicitBoolCastCheck::registerMatchers(MatchFinder *Finder) {
   // This check doesn't make much sense if we run it on language without
   // built-in bool support.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to