[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 21 08:58:51 PDT 2016
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM with two minor nits.
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:102
+ SpecialMemberFunctionKind Kind = KV.second;
+ auto &Members = ClassWithSpecialMembers[ID];
+ if (find(Members, Kind) == Members.end()) Members.push_back(Kind);
----------------
Please don't use `auto` since the type is not spelled out in the initializer.
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103
+ auto &Members = ClassWithSpecialMembers[ID];
+ if (find(Members, Kind) == Members.end()) Members.push_back(Kind);
+ }
----------------
Please drop the `push_back()` onto its own line.
Repository:
rL LLVM
https://reviews.llvm.org/D25647
More information about the cfe-commits
mailing list