[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 09:23:43 PDT 2016


jlebar added inline comments.


================
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);
+    }
----------------
jlebar wrote:
> bkramer wrote:
> > jlebar wrote:
> > > aaron.ballman wrote:
> > > > Please drop the `push_back()` onto its own line.
> > > This was actually how clang-tidy formatted the line.  My understanding is that we go with that in llvm projects?  Unless you're saying I have an outdated clang-tidy, in which case I will investigate that.
> > It's what happens when your clang-format is using Google style. Some versions of clang-format ship with weird defaults, so you have to add -style=LLVM manually.
> Er, s/clang-tidy/clang-format/
Oh, this is happening because clang-tools-extra does not have a .clang-format file in tree.  It's relying on us picking up clang's .clang-format file, but if you use the monorepo [0] (or if you have a tool that's smart and stops at git repository boundaries) you won't find it.

Mystery solved.  I can check those files in if you want, or not if you want.  :)

[0] https://github.com/llvm-project/llvm-project


https://reviews.llvm.org/D25647





More information about the cfe-commits mailing list