alexfh (Alexander Kornienko)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 10 2012, 10:35 AM (266 w, 3 d)

Recent Activity

Thu, Aug 17

alexfh committed rL311136: [clang-tidy] Add modernize-use-equals-default.IgnoreMacros option.
[clang-tidy] Add modernize-use-equals-default.IgnoreMacros option
Thu, Aug 17, 4:09 PM
alexfh accepted D36670: misc-misplaced-widening-cast: fix assertion.

LG. Thank you for the fix!

Thu, Aug 17, 7:55 AM · Restricted Project
alexfh accepted D36822: [clang-tidy] Ignore statements inside a template instantiation..

LG with a nit.

Thu, Aug 17, 7:01 AM
alexfh accepted D36786: [clang-tidy] Don't generate fixes for initializer_list constructor in make_unique check..

Still LG with one comment.

Thu, Aug 17, 2:50 AM

Wed, Aug 16

alexfh accepted D36786: [clang-tidy] Don't generate fixes for initializer_list constructor in make_unique check..

LG

Wed, Aug 16, 8:33 AM
alexfh accepted D35367: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module..

LG with a nit.

Wed, Aug 16, 8:30 AM · Restricted Project
alexfh accepted D35363: [clang-tidy] Add a close-on-exec check on accept4() in Android module..

LG

Wed, Aug 16, 8:29 AM · Restricted Project
alexfh accepted D35365: [clang-tidy] Add a close-on-exec check on epoll_create1() in Android module..

LG

Wed, Aug 16, 8:29 AM · Restricted Project
alexfh accepted D35362: [clang-tidy] Add a close-on-exec check on accept() in Android module..

LG with a nit.

Wed, Aug 16, 8:29 AM · Restricted Project
alexfh added a comment to D34440: [Clang] Expand response files before loading compilation database.

@alexfh
Thanks for the response!
Yes, we re-implemented logic and now use JSON compilation database to pass compiler options to Clang-Tidy.
Anyway, i think in general it's useful to support @response_files, see my comment: https://reviews.llvm.org/D34440#813411

Wed, Aug 16, 8:19 AM · Restricted Project
alexfh added a comment to D34440: [Clang] Expand response files before loading compilation database.

Many build systems normally generate response files on-fly in some circumstances (e.g. if command line is longer than some platform-imposed limit). So IMO response files should be a perfect citizen here.

friendly ping

Wed, Aug 16, 4:04 AM · Restricted Project

Fri, Aug 11

alexfh added a comment to D35941: Fix -Wshadow false positives with function-local classes..

IIUC, most cases where -Wshadow warnings are issued is when a declaration from an enclosing scope would be accessible if there was no declaration that shadows it. In this case the the local variable of a function would not be accessible inside the local class anyway

That's not strictly true; the variable can be accessed in unevaluated operands, and in code doing so, a -Wshadow warning might (theoretically) be useful:

void f(SomeComplexType val) {
  struct A {
    decltype(val) &ref;
    void g(int val) {
      decltype(val) *p = &ref;
    }
  } a = {val};
}
Fri, Aug 11, 6:05 AM

Thu, Aug 10

alexfh added a comment to D36577: [clang-tidy] add an alias hicpp-braces-around-statements.

Could you rebase the patch? It doesn't apply cleanly.

Thu, Aug 10, 8:42 AM · Restricted Project
alexfh accepted D36577: [clang-tidy] add an alias hicpp-braces-around-statements.
Thu, Aug 10, 8:33 AM · Restricted Project
alexfh accepted D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module..

LG with a few nits.

Thu, Aug 10, 6:06 AM · Restricted Project
alexfh accepted D35932: [clang-tidy] Add integer division check.

LG

Thu, Aug 10, 6:00 AM · Restricted Project
alexfh committed rL310587: [clang-tidy] Updated docs and release notes for r310584.
[clang-tidy] Updated docs and release notes for r310584
Thu, Aug 10, 5:54 AM
alexfh committed rL310586: [clang-tidy] Add a test..
[clang-tidy] Add a test.
Thu, Aug 10, 5:39 AM
alexfh committed rL310585: [clang-tidy] Enable test for http://llvm.org/PR26228.
[clang-tidy] Enable test for http://llvm.org/PR26228
Thu, Aug 10, 5:25 AM
alexfh committed rL310584: [clang-tidy] Add modernize-use-emplace.IgnoreImplicitConstructors option.
[clang-tidy] Add modernize-use-emplace.IgnoreImplicitConstructors option
Thu, Aug 10, 5:20 AM
alexfh committed rL310576: [Lexer] Finding beginning of token with escaped new line.
[Lexer] Finding beginning of token with escaped new line
Thu, Aug 10, 3:07 AM
alexfh closed D30748: [Lexer] Finding beginning of token with escaped new line by committing rL310576: [Lexer] Finding beginning of token with escaped new line.
Thu, Aug 10, 3:07 AM

Wed, Aug 9

alexfh added a comment to D35937: [clang-tidy] Add new readability non-idiomatic static access.

A few late comments.

Wed, Aug 9, 11:23 AM · Restricted Project
alexfh requested changes to D35932: [clang-tidy] Add integer division check.

A few more nits.

Wed, Aug 9, 10:16 AM · Restricted Project
alexfh accepted D36452: [clang-tidy] Fix another crash in make-unique check..

Thank you for the fix!
Looks good!

Wed, Aug 9, 9:42 AM
alexfh requested changes to D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module..
Wed, Aug 9, 9:41 AM · Restricted Project
alexfh added a comment to D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module..

I'm not sure this approach is the best to deal with the boilerplate, but it seems like an improvement compared to repeating code. See a few comments inline.

Wed, Aug 9, 9:41 AM · Restricted Project
alexfh committed rL310491: [clang-tidy] Ignore newlines in checks list.
[clang-tidy] Ignore newlines in checks list
Wed, Aug 9, 9:01 AM

Tue, Aug 8

alexfh committed rL310366: [clang-tidy] 'implicit cast' -> 'implicit conversion'.
[clang-tidy] 'implicit cast' -> 'implicit conversion'
Tue, Aug 8, 7:56 AM
alexfh closed D36456: [clang-tidy] 'implicit cast' -> 'implicit conversion' by committing rL310366: [clang-tidy] 'implicit cast' -> 'implicit conversion'.
Tue, Aug 8, 7:56 AM
alexfh updated the diff for D36456: [clang-tidy] 'implicit cast' -> 'implicit conversion'.

Added redirections from the old check documents.

Tue, Aug 8, 3:37 AM
alexfh created D36456: [clang-tidy] 'implicit cast' -> 'implicit conversion'.
Tue, Aug 8, 3:27 AM

Fri, Aug 4

alexfh accepted D30748: [Lexer] Finding beginning of token with escaped new line.

Looks good with one nit.

Fri, Aug 4, 6:30 PM
alexfh accepted D36264: [clang-tidy] Ignore macros in make-unique check..

LG with a couple of nits.

Fri, Aug 4, 3:44 AM

Thu, Aug 3

alexfh requested changes to D36051: [clang-tidy] List the checkers with autofix.
Thu, Aug 3, 8:19 AM
alexfh added a comment to D36051: [clang-tidy] List the checkers with autofix.

Maybe instead of a separate list, having this information like yes/no column in a table in the original is more user-friendly.

Thu, Aug 3, 8:18 AM
alexfh accepted D36016: [clang-tidy] Support initializer-list constructor cases in modernize-make-unique..

LG with a couple of comments.

Thu, Aug 3, 7:50 AM
alexfh accepted D36264: [clang-tidy] Ignore macros in make-unique check..

LG with one comment.

Thu, Aug 3, 7:36 AM
alexfh added inline comments to D27207: Adds hasUnqualifiedDesugaredType to allow matching through type sugar..
Thu, Aug 3, 7:12 AM

Mon, Jul 31

alexfh committed rL309569: Fix -Wshadow false positives with function-local classes..
Fix -Wshadow false positives with function-local classes.
Mon, Jul 31, 8:22 AM
alexfh closed D35941: Fix -Wshadow false positives with function-local classes. by committing rL309569: Fix -Wshadow false positives with function-local classes..
Mon, Jul 31, 8:22 AM

Fri, Jul 28

alexfh committed rL309380: [clang-tidy] Expand readability-redundant-function-ptr-dereference test.
[clang-tidy] Expand readability-redundant-function-ptr-dereference test
Fri, Jul 28, 5:47 AM
alexfh committed rL309379: [clang-tidy] readability-redundant-declaration: ignore friends and macros.
[clang-tidy] readability-redundant-declaration: ignore friends and macros
Fri, Jul 28, 5:47 AM

Thu, Jul 27

alexfh added a comment to D35941: Fix -Wshadow false positives with function-local classes..
In D35941#823020, @rnk wrote:

I'm not really sure this is a bug. The point of -Wshadow is to warn on valid but possibly confusing code. Shadowing a variable is perfectly legal, but people think it's confusing, so we implemented this warning. Are we concerned that people might get confused between the different local variables here?

Thu, Jul 27, 6:22 PM
alexfh requested changes to D35932: [clang-tidy] Add integer division check.

Could you run the check over LLVM+Clang code and post a summary of results here?

Thu, Jul 27, 7:58 AM · Restricted Project
alexfh added inline comments to D35932: [clang-tidy] Add integer division check.
Thu, Jul 27, 7:55 AM · Restricted Project
alexfh created D35941: Fix -Wshadow false positives with function-local classes..
Thu, Jul 27, 6:43 AM

Wed, Jul 26

alexfh committed rL309092: Follow up for r307085: a better fix for a dangling StringRef..
Follow up for r307085: a better fix for a dangling StringRef.
Wed, Jul 26, 3:15 AM
alexfh edited reviewers for D35847: clang-format: Fix left pointer alignment after delctype/typeof, added: krasimir; removed: alexfh.
Wed, Jul 26, 2:33 AM · Restricted Project

Tue, Jul 25

alexfh accepted D35194: [clang-tidy] clang-apply-replacements: Don't insert null entry.

LG. Do you need someone to commit the patch for you?

Tue, Jul 25, 7:01 AM · Restricted Project
alexfh requested changes to D33829: [clang-tidy] avoid reserved names check.
Tue, Jul 25, 3:57 AM · Restricted Project

Mon, Jul 24

alexfh added a comment to D35787: [clang-tidy] Ignore vector<bool> in inefficient-vector-operation..

Should we look at whether the size is statically known?

Mon, Jul 24, 9:12 AM
alexfh added a comment to D35787: [clang-tidy] Ignore vector<bool> in inefficient-vector-operation..

Should we look at whether the size is statically known?

Mon, Jul 24, 9:12 AM
alexfh requested changes to D34654: Allow passing a regex for headers to exclude from clang-tidy.
Mon, Jul 24, 9:07 AM · Restricted Project
alexfh requested changes to D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init.

A few more nits.

Mon, Jul 24, 9:07 AM
alexfh requested changes to D33829: [clang-tidy] avoid reserved names check.
Mon, Jul 24, 8:59 AM · Restricted Project
alexfh accepted D35790: [clang-tidy] Handle incomplete types in bugprone-undefined-memory-manipulation check..

LG. Thank you for the fix!

Mon, Jul 24, 8:50 AM · Restricted Project

Sun, Jul 23

alexfh accepted D35718: [clang-tidy] Do not issue fixit for explicit template specializations.

LG. Thanks!

Sun, Jul 23, 6:25 AM

Fri, Jul 21

alexfh requested changes to D35718: [clang-tidy] Do not issue fixit for explicit template specializations.
Fri, Jul 21, 5:22 AM
alexfh added a comment to D31326: Add option to export fixes to run-clang-tidy.py.

Committed as r308726.

Fri, Jul 21, 3:33 AM · Restricted Project
alexfh committed rL308726: [clang-tidy] Add option to export fixes to run-clang-tidy.py.
[clang-tidy] Add option to export fixes to run-clang-tidy.py
Fri, Jul 21, 3:32 AM
alexfh closed D31326: Add option to export fixes to run-clang-tidy.py by committing rL308726: [clang-tidy] Add option to export fixes to run-clang-tidy.py.
Fri, Jul 21, 3:32 AM · Restricted Project
alexfh accepted D31326: Add option to export fixes to run-clang-tidy.py.

LG. I'll commit the patch for you

Fri, Jul 21, 2:59 AM · Restricted Project

Thu, Jul 20

alexfh committed rL308621: [clang-tidy] s/1/true/, NFC.
[clang-tidy] s/1/true/, NFC
Thu, Jul 20, 7:57 AM
alexfh requested changes to D31326: Add option to export fixes to run-clang-tidy.py.
Thu, Jul 20, 6:29 AM · Restricted Project
alexfh requested changes to D33829: [clang-tidy] avoid reserved names check.
Thu, Jul 20, 5:28 AM · Restricted Project
alexfh requested changes to D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init.

Is there any way for multiple checks to share an option?

There's OptionsView::getLocalOrGlobal. See how StrictMode option is read in ArgumentCommentCheck, for example.

ArgumentCommentCheck uses getLocalOrGlobal, but InefficientStringConcatenationCheck and SuspiciousEnumUsageCheck don't.
6 checks have an IncludeStyle option that isn't shared.
4 checks share a HeaderFileExtensions option, but with different defaults.

The right thing would be to fix these. I might get around to this, if nobody does this before me.

Thu, Jul 20, 5:08 AM
alexfh committed rL308605: [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used.
[clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used
Thu, Jul 20, 5:02 AM
alexfh added a comment to D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check..

The top of stack trace is:

clang::CXXRecordDecl::isTriviallyCopyable()
(unknown)
clang::tidy::bugprone::(anonymous namespace)::internal::matcher_isNotTriviallyCopyableMatcher::matches()
Thu, Jul 20, 4:45 AM · Restricted Project
alexfh added a comment to D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check..

FYI, bugprone-undefined-memory-manipulation crashes on some of our code. I guess, this happens with dependent types, but I don't have an isolated repro yet.

Thu, Jul 20, 4:41 AM · Restricted Project
alexfh added a comment to D34654: Allow passing a regex for headers to exclude from clang-tidy.

In our project we want to do something like include src/.*.h but exclude src/some-thirdparty/.*.h.

Thu, Jul 20, 3:43 AM · Restricted Project
alexfh added a comment to D34654: Allow passing a regex for headers to exclude from clang-tidy.

I wonder whether anyone uses file patterns that need anything from regular expressions beyond | and .*. If not, globs (as used in -checks=) would be a better solution.

Thu, Jul 20, 2:57 AM · Restricted Project

Jul 17 2017

alexfh requested changes to D34654: Allow passing a regex for headers to exclude from clang-tidy.
Jul 17 2017, 8:14 AM · Restricted Project
alexfh committed rL308181: [clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option.
[clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option
Jul 17 2017, 7:43 AM

Jul 15 2017

alexfh added a comment to D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module..

I have deja vu ;)

Should we make a single check for all CLOEXEC and friends with a single configurable list of (function name, flag name) pairs?

Jul 15 2017, 2:11 AM · Restricted Project
alexfh requested changes to D35364: [clang-tidy] Add a close-on-exec check on dup() in Android module..
Jul 15 2017, 1:32 AM · Restricted Project
alexfh requested changes to D35362: [clang-tidy] Add a close-on-exec check on accept() in Android module..

See the comment on D35372.

Jul 15 2017, 1:31 AM · Restricted Project
alexfh requested changes to D35363: [clang-tidy] Add a close-on-exec check on accept4() in Android module..

See the comment on D35372.

Jul 15 2017, 1:31 AM · Restricted Project
alexfh added a comment to D35364: [clang-tidy] Add a close-on-exec check on dup() in Android module..

See the comment on D35372.

Jul 15 2017, 1:28 AM · Restricted Project
alexfh requested changes to D35365: [clang-tidy] Add a close-on-exec check on epoll_create1() in Android module..

See the comment on D35372.

Jul 15 2017, 1:28 AM · Restricted Project
alexfh requested changes to D35368: [clang-tidy] Add a close-on-exec check on inotify_init1() in Android module..

See the comment on D35372.

Jul 15 2017, 1:26 AM · Restricted Project
alexfh requested changes to D35367: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module..

See the comment on D35372.

Jul 15 2017, 1:24 AM · Restricted Project
alexfh requested changes to D35370: [clang-tidy] Add a close-on-exec check on inotify_init() in Android module..

See the comment on D35372.

Jul 15 2017, 1:22 AM · Restricted Project
alexfh requested changes to D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module..
Jul 15 2017, 1:18 AM · Restricted Project
alexfh added a comment to D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module..

I have deja vu ;)

Jul 15 2017, 1:15 AM · Restricted Project

Jul 14 2017

alexfh added a comment to D34654: Allow passing a regex for headers to exclude from clang-tidy.

Please regenerate the patch with full context (e.g. as described in llvm.org/docs/Phabricator.html).

Jul 14 2017, 7:11 PM · Restricted Project
alexfh added a comment to D34440: [Clang] Expand response files before loading compilation database.

Even if i'll change content of arguments.rsp to
-std=c++11 -Ipath/to/include -Ipath/to/include2 -DMACRO ....
and will try to call clang-tidy process in this way:
clang-tidy -checks=* main.cpp -export-fixes=... -- @arguments.rsp
it also has no effect, because all compiler options will be ignored (i thinks it's because that stripPositionalArgs() function deletes @arguments.rsp parameter as unused input).

Ah, ok: this is definitely the way it should work (adding the response file after the --). I think this is the use case we should fix - probably by fixing stripPositionalArgs?

Jul 14 2017, 5:53 AM · Restricted Project
alexfh added a comment to D34440: [Clang] Expand response files before loading compilation database.

To discuss:
...
By this moment, we unable to use CompilationDatabase.json from CLion side which is widely used in Clang-Tidy and in other common tools.

Jul 14 2017, 5:48 AM · Restricted Project
alexfh accepted D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check..

Looks good with a single comment.

Jul 14 2017, 3:47 AM · Restricted Project
alexfh committed rL308015: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output.
[Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output
Jul 14 2017, 3:38 AM
alexfh committed rL308014: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output.
[Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output
Jul 14 2017, 3:38 AM
alexfh closed D35349: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output by committing rL308015: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output.
Jul 14 2017, 3:38 AM · Restricted Project
alexfh closed D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output by committing rL308014: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output.
Jul 14 2017, 3:38 AM · Restricted Project
alexfh added inline comments to D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output.
Jul 14 2017, 3:38 AM · Restricted Project

Jul 12 2017

alexfh accepted D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr..

LG. Thanks!

Jul 12 2017, 9:03 AM
alexfh accepted D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check..

LG

Jul 12 2017, 9:01 AM · Restricted Project
alexfh added inline comments to D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check..
Jul 12 2017, 8:36 AM · Restricted Project
alexfh requested changes to D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check..
Jul 12 2017, 8:28 AM · Restricted Project
alexfh accepted D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo.

LG. Thank you for the fix!

Jul 12 2017, 6:29 AM
alexfh accepted D34913: [clang-tidy] Add a new Android check "android-cloexec-socket".

LG

Jul 12 2017, 6:28 AM · Restricted Project