[PATCH] D51949: [WIP][clang-tidy] initial ideas to isolate variable declarations

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 27 12:46:56 PDT 2018


JonasToth marked 9 inline comments as done.
JonasToth added inline comments.


================
Comment at: clang-tidy/readability/IsolateDeclCheck.cpp:211
+  std::vector<StringRef> Snippets;
+  Snippets.reserve(Ranges.size());
+
----------------
kbobyrev wrote:
> nit: It would be probably easier to have `Snippets(Ranges.size()` and then insert each `Snippet` to the correct position. That would require sacrificing for-range loop and having a counter, but I think that it would make this piece slightly better. Up to you, I don't have strong opinion about this part.
I prefer this one :)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51949





More information about the cfe-commits mailing list