Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-05 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A couple of post-commit comments. Comment at: clang-tools-extra/trunk/clang-tidy/google/GlobalNamesInHeadersCheck.h:24 @@ +23,3 @@ +/// +/// The check supports these options: +/// - `HeaderFileExtensions`: a comma-separated list of filename extensions

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-05 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259879: [clang-tdiy] Add header file extension configuration support. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D16113?vs=46923&id=47007#toc Repository: rL LLVM http://r

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-05 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Still looks good. http://reviews.llvm.org/D16113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Haojian Wu via cfe-commits
hokein marked 2 inline comments as done. hokein added a comment. http://reviews.llvm.org/D16113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 46923. hokein added a comment. Update. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tidy/google/UnnamedName

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:46 @@ +45,3 @@ +bool parseHeaderFileExtensions(llvm::StringRef AllHeaderFileExtensions, + HeaderFileExtensionsSet &HeaderFileExtensions, +

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:46 @@ +45,3 @@ +bool parseHeaderFileExtensions(llvm::StringRef AllHeaderFileExtensions, + HeaderFileExtensionsSet &HeaderFileExtensions, +

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:40 @@ +39,3 @@ +',')) { +// FIXME(hokein): Find a more suitable way to handle invalid configuration +// options. It's common to

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a couple of comments. Thanks for working on this! Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:45 @@ +44,3 @@ + +bool parseHeaderFileExtensions(l

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Haojian Wu via cfe-commits
hokein marked 3 inline comments as done. Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:51 @@ +50,3 @@ + HeaderFileExtensions.clear(); + for (llvm::StringRef Suffix : Suffixes) { +llvm::StringRef Extension = Suffix.trim(); Thanks for the explanat

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-04 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 46897. hokein added a comment. Address Alex's comments. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tidy/g

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-02-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay. A few more comments. Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.cpp:30 @@ +29,3 @@ + RawStringHeaderFileExtensions, HeaderFileExtensions)) { +llvm::errs() << "Invalid header file extension: " +

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-26 Thread Haojian Wu via cfe-commits
hokein added a comment. ping @alexfh. http://reviews.llvm.org/D16113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-25 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for working on this! http://reviews.llvm.org/D16113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-25 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45852. hokein added a comment. Change delimeter from "," to ";". http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h cla

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-22 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:49 @@ +48,3 @@ + AllHeaderFileExtensions.split(Suffixes, ','); + HeaderFileExtensions.clear(); + for (llvm::StringRef Suffix : Suffixes) { I'm +1 on keeping the

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-20 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Mostly looks good, except I do still have the question about list delimiters that I'd like to hear some thoughts on. My primary concern is that I hope to avoid having different separators for different lists, and I wonder whether we want a common "parse a list of

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-19 Thread Haojian Wu via cfe-commits
hokein marked 3 inline comments as done. Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.h:26 @@ +25,3 @@ +/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of +/// header files (no need to includ "."). "h" by default. +/// For extensio

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-19 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45349. hokein added a comment. Update comments. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tidy/google/Un

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.h:26 @@ +25,3 @@ +/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of +/// header files (no need to includ "."). "h" by default. +/// For extension-le

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-16 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45077. hokein marked an inline comment as done. hokein added a comment. Format code style. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalN

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-15 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:48 @@ +47,3 @@ + +bool parseHeaderFileExtensions(llvm::StringRef AllHeaderFileExtensions, + HeaderFileExtensionsSet &HeaderFileExtensions) { --

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-15 Thread Haojian Wu via cfe-commits
hokein marked 2 inline comments as done. Comment at: clang-tidy/ClangTidyOptions.cpp:269 @@ +268,3 @@ + SmallVector Suffixes; + HeaderFileExtensions.split(Suffixes, ','); + for (const auto& Suffix : Suffixes) { aaron.ballman wrote: > alexfh wrote: > > It's rath

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-15 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45006. hokein marked an inline comment as done. hokein added a comment. Add extension-less header file doc. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-ti

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Haojian Wu via cfe-commits
hokein marked 11 inline comments as done. Comment at: clang-tidy/ClangTidy.h:65 @@ -56,3 +64,3 @@ /// \c CheckOptions. If the corresponding key is not present, returns /// \p Default. template Makes sense. I just refer from `std::string get(StringRef Loc

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44951. hokein added a comment. Address review comments. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tidy/g

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); aaron.ballman w

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); alexfh w

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); aaron.ballman w

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); alexfh w

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:78 @@ +77,3 @@ +static cl::opt +HeaderFileExtensions("header-file-extensions", + cl::desc("File extensions that regard as header file.\n" hokein wrote: > alexfh wrote:

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-13 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:78 @@ +77,3 @@ +static cl::opt +HeaderFileExtensions("header-file-extensions", + cl::desc("File extensions that regard as header file.\n" alexfh wrote: > We don't need

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-13 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); hokein wrote: >

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-13 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the patch! I have a few concerns though. See inline comments. Comment at: clang-tidy/ClangTidy.cpp:348 @@ +347,3 @@ + LocalName.str() }; + for (const auto &Name : Names) { +auto Iter = CheckOptions.fi

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-12 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); aaron.ballman w

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Public-facing documentation should also be updated to specify the new option for the various checkers. Comment at: clang-tidy/ClangTidy.h:55 @@ +54,3 @@ + /// Reads the option with the check-local name \p LocalName from local or + /// global \c