[PATCH] D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 14:06:58 PDT 2020


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp:103
+                                Context->getOptions().CheckOptions)
+                        .get("UseAssignment", 0) != 0) {}
+
----------------
`OptionsView::get(...)` is specialized for bools, so you can just pass `false` as the second argument and negate the need to compare against zero


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71199/new/

https://reviews.llvm.org/D71199



More information about the cfe-commits mailing list