[PATCH] D16152: [clang-tidy] Add check performance-faster-string-find
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 14 07:47:09 PST 2016
alexfh added inline comments.
================
Comment at: clang-tidy/performance/FasterStringFindCheck.cpp:25
@@ +24,3 @@
+ SmallVector<StringRef, 4> Classes;
+ Option.split(Classes, ",");
+ return std::vector<std::string>(Classes.begin(), Classes.end());
----------------
aaron.ballman wrote:
> alexfh wrote:
> > aaron.ballman wrote:
> > > It might be nice for this to be more tolerant of whitespace around the commas.
> > I don't see much value in this, since it's not someone will change frequently (I guess, once per codebase on average).
> > I don't see much value in this, since it's not someone will change frequently (I guess, once per codebase on average).
>
> Anything that's user-facing should be fault tolerant and sanitized for a better user experience.
I also don't feel strongly about this. Trimming all strings after splitting should be a trivial 2-line addition to this patch.
http://reviews.llvm.org/D16152
More information about the cfe-commits
mailing list