hokein marked 2 inline comments as done.

================
Comment at: clang-tidy/ClangTidyOptions.cpp:269
@@ +268,3 @@
+  SmallVector<llvm::StringRef, 5> Suffixes;
+  HeaderFileExtensions.split(Suffixes, ',');
+  for (const auto& Suffix : Suffixes) {
----------------
aaron.ballman wrote:
> alexfh wrote:
> > It's rather inefficient to split the string each time the function is 
> > called. If even we needed this function, we would better pass an 
> > `ArrayRef<StringRef>`. But even better, we can use `llvm::StringSet` and 
> > get rid of this function at all (we might need a helper function to parse a 
> > comma-separated list of extensions to a StringSet though).
> This code seems like it will fail if there are spaces in the extension list, 
> like `.h, .hxx` instead of `.h,.hxx`. I think the list, as given by the end 
> user, should be processed into a vector of sorts so that things can be 
> normalized (entries without a period can be diagnosed, spaces removed, etc).
Now it's tolerant of whitespace around the commas.


http://reviews.llvm.org/D16113



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to