[PATCH] D34526: [clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument.

2017-06-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D34526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with one nit. Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:24 + +bool HasCloseOnExecFlag(const Expr *Flags, const SourceManager &SM, +const

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-06-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry for the delay, I was on vacation. This looks much better now, thanks! A few more comments though. Comment at: lib/Lex/Lexer.cpp:460 +/// \brief Check if new line pointed by Str is escaped. +bool isNewLineEscaped(const char *BufferStart, const char

[PATCH] D34513: [NFC] Update to account for DiagnosticRenderer use of FullSourceLoc

2017-06-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Looks like a pretty mechanical change. https://reviews.llvm.org/D34513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-06-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Daniel is a better reviewer here than myself. A few cents from me though: why do we want to make an exception for comments and not for regular code? https://reviews.llvm.org/D33589 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-26 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D34206#783673, @hokein wrote: > In https://reviews.llvm.org/D34206#780455, @Eugene.Zelenko wrote: > > > It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for > > llvm::make_unique. > > > +1. See https://reviews.llvm.org/D34334,

[PATCH] D34286: [clang-tidy] Fix type names in modernize-use-unique/shared_ptr checks.

2017-06-26 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:23 + const LangOptions &Lang) { + return clang::Lexer::getSourceText( + clang::CharSou

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. In https://reviews.llvm.org/D40671#949732, @xgsa wrote: > In https://reviews.llvm.org/D40671#949687, @alexfh wrote: > > > How are unknown check names handled? More specifically: will the `// > > NOLINT(runtime/explicit)` comment disable all

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D40671#954906, @xgsa wrote: > In https://reviews.llvm.org/D40671#954661, @alexfh wrote: > > > In https://reviews.llvm.org/D40671#953888, @aaron.ballman wrote: > > > > > FWIW, I think we should do something about unknown check names in NOLINT >

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-12-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry, I lost this patch. I've looked at the results and it still seems that the signal-to-noise ratio is quite low. There's definitely potential in using parameter name and argument spelling to detect possibly swapped arguments, and there's a recent research on this top

[PATCH] D41077: [analyser] different.CallArgsOrder checker implementation

2017-12-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41077#958819, @szepet wrote: > 4. FYI: There is a similar check under review which uses only the AST > provided information and implemented as a tidy-checker: > https://reviews.llvm.org/D20689 (As I see your checker does not uses symbolic >

[PATCH] D41708: [clang-tidy] Update fuchsia-overloaded-operator to check for valid loc

2018-01-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp:38 + if (Loc.isValid()) +diag(Loc, "cannot overload %0") << D; } This is not related to the fix, but the warning message is unclear, incorrect and confusing: one most

[PATCH] D41720: [clang-tidy] Add a -show-color flag.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Clang supports -fcolor-diagnostics. I guess, we could use it, e.g. via -extra-arg=-fcolor-diagnostics. Comment at: clang-tidy/ClangTidyOptions.h:93 + /// \brief S

[PATCH] D41716: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41716#967247, @vmiklos wrote: > In https://reviews.llvm.org/D41716#967237, @lebedev.ri wrote: > > > That changes the defaults though. I thought clang-tidy *tried* to produce > > the same results > > on different clang-tidy versions with the s

[PATCH] D41716: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thus, looks good. Thanks! https://reviews.llvm.org/D41716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D15032: [clang-tidy] new checker cppcoreguidelines-pro-lifetime

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Herald added subscribers: kbarton, mgorny, nemanjai. https://reviews.llvm.org/D15031 has landed quite a while ago. Could you rebase the patch? https://reviews.llvm.org/D15032 ___

[PATCH] D35787: [clang-tidy] Ignore vector in inefficient-vector-operation.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D35787#830351, @hokein wrote: > In https://reviews.llvm.org/D35787#819007, @alexfh wrote: > > > Should we look at whether the size is statically known? > > > Do you mean the size of the template type T in `vector`? STL only > provides a templa

[PATCH] D41720: [clang-tidy] Add a -show-color flag.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41720#968338, @alexfh wrote: > Clang supports -fcolor-diagnostics. I guess, we could use it, e.g. via > -extra-arg=-fcolor-diagnostics. On a second thought, configuring the colors using -extra-arg doesn't seem like a good solution to me. A

[PATCH] D40478: Added control flow architecture protection Flag

2018-01-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/CodeGen/x86-cf-protection.c:1 +// RUN: not %clang_cc1 -fsyntax-only -S -emit-llvm -triple i386-unknown-unknown -fcf-protection=return %s 2>&1 | FileCheck %s --check-prefix=RETURN +// RUN: not %clang_cc1 -fsyntax-only -S -emit-llvm

[PATCH] D40478: Added control flow architecture protection Flag

2018-01-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/CodeGen/x86-cf-protection.c:1 +// RUN: not %clang_cc1 -fsyntax-only -S -emit-llvm -triple i386-unknown-unknown -fcf-protection=return %s 2>&1 | FileCheck %s --check-prefix=RETURN +// RUN: not %clang_cc1 -fsyntax-only -S -emit-llvm

[PATCH] D41326: [clang-tidy] Added diagnostics about incorrect usage of NOLINT comment

2018-01-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. A high-level comment: NOLINT category parsing and warning on incorrect NOLINT categories makes it more difficult for code to comply both with clang-tidy and cpplint (https://github.com/cpplint/cpplint), since: 1. the category names in these tools are different, 2. cpplin

[PATCH] D38284: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces

2018-01-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. It looks like the latest patch was lost. I'll see whether it still applies cleanly... https://reviews.llvm.org/D38284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D38284: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces

2018-01-11 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322274: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested… (authored by alexfh, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: ht

[PATCH] D43779: [Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome, thank you for this cleanup! Repository: rC Clang https://reviews.llvm.org/D43779 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D43780: [Tooling] [1/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome, thank you for this cleanup! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43780 ___ cfe-commits mailing list cfe-commi

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeSharedCheck.h:38 + + bool isVersionSupported(const clang::LangOptions &LangOpts) const override; }; 1. s/clang::// 2. it's not clear which "version" is this all about. I'd suggest isLanguageSup

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/modernize-make-unique-cxx11.cpp:5 +#include "unique_ptr.h" +// CHECK-FIXES-NOT: #include + I'd better use positive assertions with the original text. Otherwise the test can pass if the check does any rep

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: hokein, sammccall, aaron.ballman. Herald added subscribers: mgorny, klimek. rename_check.py {misc,bugprone}-forwarding-reference-overload rename_check.py {misc,bugprone}-macro-repeated-side-effects rename_check.py {misc,bugprone}-lambda-functio

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 136275. alexfh added a comment. - Fixed a header guard Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43867 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ForwardingReferenceOve

[PATCH] D43779: [Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Do you have a way to reproduce the gcc crashes? Repository: rL LLVM https://reviews.llvm.org/D43779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: hokein, sammccall, aaron.ballman. Herald added subscribers: mgorny, klimek. clang-tidy/rename_check.py {misc,bugprone}-string-integer-assignment clang-tidy/rename_check.py {misc,bugprone}-string-literal-with-embedded-nul clang-tidy/rename_check

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D43867#1021956, @aaron.ballman wrote: > When we do this sort of move, do we want to keep the check under its old name > for a deprecation period so that we are less likely to break automated > scripts and whatnot? I haven't done this for the

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: hokein, sammccall, aaron.ballman. Herald added subscribers: xazax.hun, mgorny, klimek. clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon clang-tidy/rename_check.py {misc,bugprone}-suspicious-string-compare clang-tidy/rename_check.

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326384: Rename more checks from misc- to bugprone-. (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43868?vs=136277&id=13

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE326384: Rename more checks from misc- to bugprone-. (authored by alexfh, committed by ). Changed prior to commit: https://reviews.llvm.org/D43868?vs=136277&id=136412#toc Repository: rCTE Clang Tool

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh marked an inline comment as done. alexfh added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor +

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D43847#1023642, @Eugene.Zelenko wrote: > May be //abseil// is better name for module? I'd also go for "abseil". I'll try to get abseil folks to review this. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: unittests/clang-tidy/ClangTidyTest.h:145 + + if (Options.FormatStyle) { +llvm::Expected Style = format::getStyle( I wonder whe

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", + getDefaultMinimumLan

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-03-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. A late comment here: should this check start a new "portability" module? This seems to be the main focus of the check rather than making code more readable. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42983 _

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-03-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D42983#1028093, @MaskRay wrote: > In https://reviews.llvm.org/D42983#1025179, @alexfh wrote: > > > A late comment here: should this check start a new "portability" module? > > This seems to be the main focus of the check rather than making code

[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-03-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D42624#1027506, @tbourvon wrote: > @alexfh What is your opinion regarding adding this dependency? I'm fine with the dependency, and I'd probably make the matcher local to the check until there is at least one more use case for it in the codeb

[PATCH] D44204: [clang-format] Break consecutive string literals in text protos

2018-03-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! Repository: rC Clang https://reviews.llvm.org/D44204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D44173: [clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics

2018-03-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thank you! LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-03-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: unittests/clang-tidy/ClangTidyTest.h:145 + + if (Options.FormatStyle) { +llvm::Expected Style = format::getStyle( jdemeule wrote: > alexfh wrote: > > I wonder whether it's better to use lit for the tests that require

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:220 + Result.Nodes.getNodeAs("sizeof-integer-call")) { +diag(E->getLocStart(), "suspicious usage of 'sizeof(expr)' to an integer"); } else if (const auto *E = Result.Nodes.g

[PATCH] D44241: [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable

2018-03-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. How does this differ from misc-unused-raii? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D16008: [clang-tidy] Add calling virtual functions in constructors/destructors check.

2018-03-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. If the CSA checker is still in alpha, I'd proceed with this check instead of investing time in polishing the CSA implementation. Repository: rL LLVM https://reviews.llvm.org/D16008 ___ cfe-commits mailing list cfe-commits

[PATCH] D16008: [clang-tidy] Add calling virtual functions in constructors/destructors check.

2018-03-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Aaron, WDYT? Repository: rL LLVM https://reviews.llvm.org/D16008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38171: [clang-tidy] Implement clang-tidy check aliases

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I apologize for completely ignoring this for a long time. I'm totally fine taking full control of clang-diagnostic- "checks", i.e. automatically adding corresponding -W flags and removing all other -W flags (or prepending -Wno-everything). However, could we split the al

[PATCH] D38171: [clang-tidy] Implement clang-tidy check aliases

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D38171#1036893, @alexfh wrote: > I'm totally fine taking full control of clang-diagnostic- "checks", i.e. > automatically adding corresponding -W flags and removing all other -W flags > (or prepending -Wno-everything). > > However, could we sp

[PATCH] D38171: [clang-tidy] Implement clang-tidy check aliases

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/misc-suspicious-semicolon-fail.cpp:5 -// RUN: clang-tidy %s -checks="-*,misc-suspicious-semicolon,clang-diagnostic*" \ -// RUN:-- -DWERROR -Wno-everything -Werror=unused-variable 2>&1 \ // RUN: | FileCheck %s -chec

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Herald added a subscriber: xazax.hun. As noted above, my concern with the current implementation is that the use of AST in this check seems to be superfluous. It should be enough to h

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Herald added a subscriber: rnkovacs. Is there a more specific module for this check than misc? For example, does it check a rule that happens to appear in a certain coding standard? O

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Should the check be in "bugprone-" instead? https://reviews.llvm.org/D33470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh removed a reviewer: Prazek. alexfh added 1 blocking reviewer(s): hokein. alexfh added a comment. A couple of nits. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:42-44 + if (RequireCPlusPlus14) +return LangOpts.CPlusPlus14; + return LangOpts.CPlusPlus11;

[PATCH] D36836: [clang-tidy] Implement sonarsource-function-cognitive-complexity check

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Removing from my dashboard until the licensing stuff gets sorted out. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D36836 ___

[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Do you want to submit the matcher part separately? https://reviews.llvm.org/D38921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Please move this check to "bugprone-", since it seems to be an appropriate category for this check. https://reviews.llvm.org/D40937 __

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thank you! BTW, there's an old related patch https://reviews.llvm.org/D17043, which mostly focuses on member functions of STL containers. It might be useful as a reference (there's a pretty extensive list of member functions and contain

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Do you need help committing the patch? https://reviews.llvm.org/D41655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Herald added a subscriber: xazax.hun. It looks like all concerns were resolved. LG, if you still want to proceed with this patch. https://reviews.llvm.org/D23130 __

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:24-25 + const CXXRecordDecl *ThisClass) { + assert(Parent); + assert(ThisClas

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thank you! https://reviews.llvm.org/D43766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-03-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41655#1037552, @khuttun wrote: > In https://reviews.llvm.org/D41655#1037234, @alexfh wrote: > > > Do you need help committing the patch? > > > Yes please, I don't have commit access to the repo. The patch doesn't apply cleanly. Please rebase

[PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2018-03-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D23130#1037256, @bkramer wrote: > I'd like to, but I don't know when I find time to rebase this thing after > more than a year of waiting for review. Sorry, it was just lost ¯\_(ツ)_/¯. I may be relying on pings from the other side too much.

[PATCH] D36892: [clang-tidy] check_clang_tidy.py: support CHECK-NOTES prefix

2018-03-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. It looks like some existing tests could benefit from this: $ grep -R -l 'note: ' test/clang-tidy/ test/clang-tidy/bugprone-forward-declaration-namespace.cpp test/clang-tidy/llvm-twine-local.cpp test/clang-tidy/overlapping.cpp test/clang-tidy/google-readability-ne

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327833: [clang-tidy] New check bugprone-unused-return-value (authored by alexfh, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: https://reviews.llvm.org/D41655?

[PATCH] D44628: Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs

2018-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. Thanks! I don't know how useful is the support of cfe being checked out somewhere else than into llvm/tools/clang. If we could give up on that, we could just kill this file and rely on clang-tidy to pick up llvm/.clang-tidy. Anyways, LG.

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Frederic, do you need someone to commit the patch for you? https://reviews.llvm.org/D43766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:24 + +static bool IsParentOf(const CXXRecordDecl &Parent, + const CXXRecordDecl &ThisClass) { http://llvm.org/docs/CodingStandards.html says: "Function

[PATCH] D46602: [clang-tidy] Store checks profiling info as JSON files

2018-06-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Repository: rL LLVM https://reviews.llvm.org/D46602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-06-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D45927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-06-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: docs/clang-tidy/checks/bugprone-exception-escape.rst:6 + +Finds functions which should not throw exceptions: +* Destructors I don't

[PATCH] D47704: [clang-tidy] Improve string type matcher for abseil-string-find-starts-with check.

2018-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D47577: [clang-format] Separate block comments with CRLF correctly

2018-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a reviewer: djasper. alexfh added inline comments. Comment at: lib/Format/BreakableToken.cpp:327 + TokenText.substr(2, TokenText.size() - 4) + .split(Lines, TokenText.count('\r') > 0 ? "\r\n" : "\n"); FYI, there's a global UseCRLF flag in Whi

[PATCH] D47945: Add support for arrays in performance-implicit-conversion-in-loop

2018-06-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D47945: Add support for arrays in performance-implicit-conversion-in-loop

2018-06-11 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334400: Add support for arrays in performance-implicit-conversion-in-loop (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/

[PATCH] D45706: [CFG] [analyzer] Add construction contexts for loop condition variables.

2018-06-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Herald added a subscriber: mikhail.ramalho. This commit seems to have introduced https://bugs.llvm.org/show_bug.cgi?id=37769. Could you take a look? Repository: rL LLVM https://reviews.llvm.org/D45706 ___ cfe-commits mail

[PATCH] D47554: [analyzer] Check for dead/impossible status checks

2018-06-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DeadStatusChecker.cpp:33 + +const Expr *hasNullptr(const BinaryOperator *BO) const { + const Expr *ret = nullptr; george.karpenkov wrote: > Could this be rewritten as a matcher instead

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-06-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D45679#1132086, @JonasToth wrote: > It might be the case, that the test is run with -no-stdinc (or similar), > so the standard library is not available. Tests should be self-contained and must not depend on any system headers. Standard libra

[PATCH] D47670: [analyzer] [NFC] Remove unused Extensive diagnostic setting, rename AlternateExtensive to Extensive.

2018-06-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:2613 + jj++; + assert(jj<10); // Get a clean copy of all the visitors. Was this meant to be committed? I see this assertion firing on a ton of files. Repository:

[PATCH] D47670: [analyzer] [NFC] Remove unused Extensive diagnostic setting, rename AlternateExtensive to Extensive.

2018-06-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D47670#1135497, @george.karpenkov wrote: > @alexfh apologies, fixed. Thank you1 Repository: rC Clang https://reviews.llvm.org/D47670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D45718: [analyzer] Allow registering custom statically-linked analyzer checkers

2018-06-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 152317. alexfh added a comment. Herald added subscribers: mikhail.ramalho, mgorny. - Added a test. Repository: rC Clang https://reviews.llvm.org/D45718 Files: include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h include/clang/StaticAnalyzer/Fronte

[PATCH] D45718: [analyzer] Allow registering custom statically-linked analyzer checkers

2018-06-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Please take another look. Repository: rC Clang https://reviews.llvm.org/D45718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52989: [clang-tidy] Fix handling of parens around new expressions in make_ checks.

2018-10-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:246 + ASTContext *Ctx) { + std::function SkipParensParents = + [&](const Expr *E) { hokein wrote: > nit: I'd use `auto` to avoid this long

[PATCH] D52989: [clang-tidy] Fix handling of parens around new expressions in make_ checks.

2018-10-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 168812. alexfh marked 2 inline comments as done. alexfh added a comment. - Remove recursion, use `auto`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52989 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmar

[PATCH] D52989: [clang-tidy] Fix handling of parens around new expressions in make_ checks.

2018-10-09 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344058: [clang-tidy] Fix handling of parens around new expressions in make_… (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.

[PATCH] D53217: [clang-tidy] add IgnoreMacros option to modernize-use-equals-delete

2018-10-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a nit. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.h:46 void check(const ast_matchers::MatchFinder::MatchResult &Result) override; +private: + const boo

[PATCH] D53339: Add the abseil-duration-factory-float clang-tidy check

2018-10-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG In general, but see a few comments inline. Comment at: clang-tidy/abseil/DurationFactoryFloatCheck.cpp:25 +llvm::Optional +TruncateIfIntegral(const FloatingLiteral &FloatLiteral) { + double value = FloatLiteral.getValueAsApproximateDouble();

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-10-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D48866#1270361, @hgabii wrote: > Warning messages changed. > Tests updated. > Comments changed based on the recommendations. > Documentation refactored and reformatted. Could you mark comments "done" where appropriate? Repository: rCTE

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/abseil/DurationFactoryFloatCheck.cpp:84 + + // Check for floats without fractional components + if (const auto *LitFloat = JonasToth wrote: > missing full stop Clang-tidy (and clang) diagnostics don't end wit

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D53339#1274561, @hwright wrote: > @JonasToth I don't actually have commit privileges, so somebody else will > have to commit for me. :) You should definitely ask commit access. Repository: rL LLVM https://reviews.llvm.org/D53339

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:30 + if (const NamedDecl *AN = Node.getAliasedNamespace()) { +// If this aliases to an actual namespace, check if its std. +if (const auto *N = dyn_cast(AN)) ---

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2019-01-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! Thanks a lot ! LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 ___ cfe-commits mail

[PATCH] D56902: [clang-tidy] Use getStripPluginsAdjuster

2019-01-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56902/new/ https://reviews.llvm.org/D56902 ___ cf

<    1   2   3   4   5   6   7   8   9   10   >