[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=" to specify custom config file

2020-10-22 Thread Hiral via Phabricator via cfe-commits
Hiralo created this revision. Hiralo added reviewers: alexfh, njames93, hokein, DmitryPolukhin. Hiralo added a project: clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. Hiralo requested review of this revision. commit

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 301065. Hiralo added a comment. Latest patch with Lit test-case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89936/new/ https://reviews.llvm.org/D89936 Files: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo marked 4 inline comments as done. Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:290 DefaultOptions.Checks = DefaultChecks; + DefaultOptions.ConfigFile = ""; DefaultOptions.WarningsAsErrors = "";

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D89936#2357088 , @njames93 wrote: > If you plan on contributing quite a lot then it would be wise to upload your > patches with arcanist - https://llvm.org/docs/Phabricator.html. It will help > prevent issues with diffs being

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-28 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp:2 +// REQUIRES: shell +// RUN: clang-tidy --config-file=%S/Inputs/config-file/config-file %T/read-file-config/test.cpp | grep "warning:

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-28 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D89936#2358572 , @DmitryPolukhin wrote: > I think this diff looks very close to what we need. I hope it will be the > last iteration. > Please also update title and description with the new name of the option, etc. Updated

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-28 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 301277. Hiralo retitled this revision from "[clang-tidy] adding "--clang-tidy-config=" to specify custom config file" to "[clang-tidy] adding "--config-file=" to specify custom config file.". Hiralo edited the summary of this revision. Hiralo added a

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-28 Thread Hiral via Phabricator via cfe-commits
Hiralo marked an inline comment as done. Hiralo added inline comments. Comment at: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp:2 +// REQUIRES: shell +// RUN: clang-tidy --config-file=%S/Inputs/config-file/config-file %T/read-file-config/test.cpp | grep

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-26 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D90010#2355490 , @dblaikie wrote: > By the looks of the code, you may want to call SetBufferSize only (do not > call SetBuffered after that - or it'll go back to the default buffer size of > 0. Oh! I missed it! For

[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=" to specify custom config file

2020-10-26 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. Thanks for your kind review. Working on it... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89936/new/ https://reviews.llvm.org/D89936 ___ cfe-commits mailing list

[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo marked an inline comment as done. Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.h:68 + /// Clang-tidy-config + llvm::Optional ClangTidyConfig; + DmitryPolukhin wrote: > I'm not sure that we need it here. I would

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-26 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. Tried using llvm::errs().SetBuffered() within printStats()... static void printStats(const ClangTidyStats ) { + llvm::errs().SetBuffered() but still I see below stderr write calls... ... write(2, "10712", 5)= 5 write(2, " warning", 8)

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-26 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D90010#2355460 , @dblaikie wrote: > In D90010#2355443 , @Hiralo wrote: > >> In D90010#2355432 , @dblaikie wrote: >> >>> Looks like you might be

[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo marked an inline comment as done. Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:324 +llvm::sys::fs::is_symlink_file(Twine(AbsoluteFilePath), IsLink); +if (!(IsFile || IsLink)) { + std::string Msg;

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-26 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D90010#2352556 , @njames93 wrote: > Isn't `llvm::errs()` buffered, negating most of the benefit here. If it is buffered, we would expect single write call to stderr. But we are seeing 7 write calls! Yes, please suggest how to

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-26 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D90010#2355432 , @dblaikie wrote: > Looks like you might be able to do something like > "llvm::errs().setBuffered()" ? Do we need to set it for each function using llvm:errs() (e.g. here printStats() ) OR can it be set once

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:330 if (!Config.empty()) { if (llvm::ErrorOr ParsedConfig = parseConfiguration(Config)) { DmitryPolukhin wrote: > I think you can make this option

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:330 if (!Config.empty()) { if (llvm::ErrorOr ParsedConfig = parseConfiguration(Config)) { Hiralo wrote: > Hiralo wrote: > > DmitryPolukhin wrote: >

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:330 if (!Config.empty()) { if (llvm::ErrorOr ParsedConfig = parseConfiguration(Config)) { Hiralo wrote: > DmitryPolukhin wrote: > > I think you can

[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D89936#2353048 , @DmitryPolukhin wrote: > ...I think this diff needs some improvements Thanks @DmitryPolukhin for your valuable comments/feedback. Please review updated patch. > + test for new option. I am planning to add

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. JFYI: using --quiet avoids call to following write calls...so that is useful. write(2, "Suppressed ", 11) = 11 write(2, "10703", 5) = 5 write(2, " warnings (", 11) = 11 write(2, "10703", 5) = 5 write(2, " in non-user code", 17) = 17 write(2, ").\n", 3) = 3 write(2, "Use

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. Another observation w.r.t. stdout... For example, consider following sample program: #include #include using namespace std; static long long A = 0ull; void f(const std::string& a) { std::cout << a << std::endl; } int main() { } When running clang-tidy on

[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 300911. Hiralo marked an inline comment as done. Hiralo added a comment. Incorporated review comments and updated patch. (a) renamed var 'ClangTidyConfig' with 'ConfigFile' (b) renamed function 'tryReadConfigFile(AbsoluteFilePath, true);' to

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 300980. Hiralo added a comment. With updated patch now changes are only in ClangTidyMain.cpp. Thanks to @DmitryPolukhin for valuable suggestion :) Added '--config-file' option to specify custom config file. ClangTidyMain.cpp reads ConfigFile into string and

[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

2020-10-22 Thread Hiral via Phabricator via cfe-commits
Hiralo created this revision. Hiralo added reviewers: alexfh, njames93, hokein, DmitryPolukhin, djasper, ilya-biryukov. Hiralo added a project: clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. Hiralo requested review of this revision. commit

[PATCH] D34654: Allow passing a regex for headers to exclude from clang-tidy

2020-12-09 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. We are dependent on this patch to exclude headers in regex while running clang-tidy. Can we have this patch merged with upcoming GA versions? or Can someone summarize what is pending in this review or what could be good alternative in v11 clang-tidy? Thank you in

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-11-02 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D89936#2364665 , @DmitryPolukhin wrote: > Looks good to me. Thanks @DmitryPolukhin and @njames93 for your help. > This revision is now accepted and ready to land.Fri, Oct 30, 8:57 PM When this patch will be merged and

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-11-03 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D89936#2370712 , @DmitryPolukhin wrote: > In D89936#2370163 , @Hiralo wrote: > >> When this patch will be merged and available in master? > > @Hiralo I can push this changes to master

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-11-03 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. Hello @@DmitryPolukhin , When I submitted latest via 'arc diff' my commit-message was... Can you please help to have following commit message? Below commit message is more clear and helpful. Sorry for inconvenience caused! commit 653cb7912bbe4daabc8d6dd6dca71b2cf9a10365

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-11-03 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. Hello @DmitryPolukhin , Sorry I missed to update 'SUMMARY' section of this review earlier! was not aware that that will be considered as commit message. I have now updated the 'SUMMARY', it is possible to revert this commit and then re-submit it with updated commit

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-29 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:337 + +Config.assign((*Text)->getBuffer()); + } DmitryPolukhin wrote: > DmitryPolukhin wrote: > > I suggest creating new local variable with text of the config

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-29 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:320-324 +if (!Checks.empty()) { + llvm::errs() << "Error: --config-file and --checks are mutually " + "exclusive. Specify only one.\n"; + return

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-30 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:329-330 + + if (!ConfigFile.empty()) { +if (!Config.empty()) { + llvm::errs() << "Error: --config-file and --config are " njames93 wrote: > nit: Should we be

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-30 Thread Hiral via Phabricator via cfe-commits
Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:329-330 + + if (!ConfigFile.empty()) { +if (!Config.empty()) { + llvm::errs() << "Error: --config-file and --config are " Hiralo wrote: > Hiralo wrote: > >

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-30 Thread Hiral via Phabricator via cfe-commits
Hiralo marked an inline comment as done. Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:329-330 + + if (!ConfigFile.empty()) { +if (!Config.empty()) { + llvm::errs() << "Error: --config-file and --config are "

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-30 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 301862. Hiralo added a comment. clang-tidy: adding "--config-file=" to specify custom config file. Let clang-tidy to read config from specified file. This option internally works exactly the same way as --config option after reading specified config file.

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-30 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 301845. Hiralo added a comment. clang-tidy: adding "--config-file=" to specify custom config file. Let clang-tidy to read config from specified file. This option internally works exactly the same way as --config option after reading specified config file.

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-10-30 Thread Hiral via Phabricator via cfe-commits
Hiralo marked 6 inline comments as done. Hiralo added inline comments. Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:320-324 +if (!Checks.empty()) { + llvm::errs() << "Error: --config-file and --checks are mutually " + "exclusive.

[PATCH] D89936: [clang-tidy] adding "--config-file=" to specify custom config file.

2020-11-04 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. Got it. No worries :) Thanks @DmitryPolukhin for your help. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89936/new/ https://reviews.llvm.org/D89936 ___ cfe-commits mailing list

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D89936#2356583 , @DmitryPolukhin wrote: > Yes, it is what I meant as a simpler solution. But please add Lit test even > for such trivial option. Please review latest patch and Lit test-case. CHANGES SINCE LAST ACTION

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 301044. Hiralo added a comment. Added Lit test for --config-file cmdline option. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89936/new/ https://reviews.llvm.org/D89936 Files: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp

[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=" to specify custom config file

2020-10-27 Thread Hiral via Phabricator via cfe-commits
Hiralo updated this revision to Diff 301047. Hiralo added a comment. Latest patch with lit test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89936/new/ https://reviews.llvm.org/D89936 Files: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D121457: Clamp negative coverage counters to zero.

2022-03-11 Thread Hiral via Phabricator via cfe-commits
Hiralo added a comment. In D121457#3375039 , @lebedev.ri wrote: > Wouldn't it be best to instead fix the non-thread-safety of the coverage > counters? Can you please elaborate or point me to code? Thanks Repository: rG LLVM Github Monorepo

[PATCH] D121457: Clamp negative coverage counters to zero.

2022-03-11 Thread Hiral via Phabricator via cfe-commits
Hiralo created this revision. Hiralo added a reviewer: vsk. Hiralo added projects: clang, LLVM. Herald added subscribers: dexonsmith, wenlei, dang, kbarton, nemanjai. Herald added a project: All. Hiralo requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits. commit

[PATCH] D121446: Add -no-unused-coverage option

2022-03-10 Thread Hiral via Phabricator via cfe-commits
Hiralo created this revision. Hiralo added a reviewer: vsk. Hiralo added a project: clang. Herald added subscribers: dexonsmith, wenlei, dang. Herald added a project: All. Hiralo requested review of this revision. Herald added a subscriber: cfe-commits. commit