JonasToth (Jonas Toth)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 31 2016, 11:13 AM (81 w, 5 d)

Recent Activity

Fri, May 4

JonasToth added inline comments to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..
Fri, May 4, 1:23 AM · Restricted Project

Wed, May 2

JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

I see. Thank you for fixing + explaining :)

Wed, May 2, 4:42 AM

Mon, Apr 30

JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • fix bad template instantiation
Mon, Apr 30, 12:38 PM
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

I migrated to the new Decl interface and adjusted my tests, there are no false positives left and I am not aware of more possible code constellation that would require testing.
If you have time you could check my tests, maybe you find something I missed.

Mon, Apr 30, 12:35 PM · Restricted Project
JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • migrate to Decl interface
  • add template metaprogramming test
Mon, Apr 30, 12:33 PM
JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

I will migrate to the new API today evening (european time).

Mon, Apr 30, 1:51 AM

Sat, Apr 28

JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • [Feature] use new statefull const checker
  • [Test] add more tests finding false positives
Sat, Apr 28, 11:23 AM
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

There is a false positive with the reference checking. Could you please take a look at it? I could not find the reason from inspecting your code.

Sat, Apr 28, 10:09 AM · Restricted Project

Apr 20 2018

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

I like your refactoring very much and i think we have a state that is close to commit.

Apr 20 2018, 3:12 AM · Restricted Project
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

Something came to my mind:

Apr 20 2018, 3:12 AM · Restricted Project

Apr 18 2018

JonasToth added inline comments to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..
Apr 18 2018, 1:50 PM · Restricted Project
JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • [Misc] mark false positives
Apr 18 2018, 1:34 PM
JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

@shuaiwang I implemented the check on top of you utility function. It does fail right now (concentrating on values only for now). I added a FIXME for all false positives/negatives for the values test cases.

Apr 18 2018, 1:25 PM
JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • [Feature] refactor check to use a utility function to determine constness
Apr 18 2018, 1:17 PM
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

Another note: https://github.com/llvm-mirror/clang-tools-extra/blob/master/clang-tidy/utils/DeclRefExprUtils.cpp
There is a isOnlyUsedAsConst with a slick implementation, using a set difference.

Apr 18 2018, 12:59 PM · Restricted Project
JonasToth added inline comments to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..
Apr 18 2018, 11:40 AM · Restricted Project
JonasToth added a dependency for D45444: [clang-tidy] WIP: implement new check for const-correctness: D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..
Apr 18 2018, 11:03 AM
JonasToth added a dependent revision for D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.: D45444: [clang-tidy] WIP: implement new check for const-correctness.
Apr 18 2018, 11:03 AM · Restricted Project
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

I was thinking about that too.

Apr 18 2018, 10:54 AM · Restricted Project
JonasToth added a comment to D41648: [clang-tidy] implement cppcoreguidelines macro rules.

OpenCV isn't clean either, here the results:

Filter: ASSERT*|ALL*|CAL*|CC*|CALC*|calc*|CL*|cl*|CUDA*|CV*|cv*|EXPECT*|GTEST*|FUNCTOR*|HAVE*|ICV*|IPL*|IPP*|ipp*|__itt*|ITT*|JAS*|jas*|MESSAGE*|MAX*|OCL*|opengl*|OPENCV*|TYP*

This one worries me a bit more because of patterns like cl* and calc* -- those seem like they're not uncommon and the pattern may silence otherwise valid diagnostics.

Apr 18 2018, 10:29 AM
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

You are doing a great job and i learn new stuff :)

Apr 18 2018, 10:14 AM · Restricted Project

Apr 17 2018

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

I will check this one first, before we get crazy and implemented something twice.

Apr 17 2018, 1:47 AM · Restricted Project
JonasToth added inline comments to D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file..
Apr 17 2018, 1:31 AM
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

Short note here too: I think having isModified return a track record, like a vector for each

  1. modifications
  2. non-const handle taking
  3. (const usages)

would be nice. Every user can decide how to react to it. Then the function would be more like usageRecord with pointers to each usage.
That allows graph building, it allows detailed diagnostics and contains all relevant information for the expr.

Apr 17 2018, 1:23 AM · Restricted Project
JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

I've updated https://reviews.llvm.org/D45679 and I think the isModified() function there is now sufficiently covering the cases you've covered here and can be used as a good starting version if you plan to use it here.
I copied your const-values test cases and it now passes with the following differences:

  • All unused local variables removed, my check will issue a warning for them because technically they're not modified, but I understand why you don't want to cover them. I don't feel strongly about it and I removed it from my copy-pasted test cases because I just to demonstrate isModified()
Apr 17 2018, 1:10 AM

Apr 16 2018

JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

You'll also need to check:

  • a member function calling another non-const member function -> *this can't be const
  • *this is passed as non-const reference param to a function -> *this can't be const
Apr 16 2018, 12:25 PM
JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

Coming from https://reviews.llvm.org/D45679, which I should have sent out much earlier to get in front of you :p

Kidding aside this check is more mature than mine and I'm happy to help incorporate mine into this one.

Apr 16 2018, 4:47 AM
JonasToth added inline comments to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..
Apr 16 2018, 4:36 AM · Restricted Project
JonasToth added a comment to D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement..

Hi @shuaiwang, i am currently working on the same check and we should definilty coordinate our work. :)

Apr 16 2018, 4:32 AM · Restricted Project

Apr 15 2018

JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

@aaron.ballman @lebedev.ri The check is getting really complex. I run it over LLVM and detected some warnings, where iam not sure if they are valid or not. Its already a somewhat usable state, but its hard to determine false positives and false negatives.

Apr 15 2018, 2:55 AM
JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • [Misc] unify handle and value modification detection
  • [Misc] found new caveats, maybe take a look at refactoring first an require this check to produce clean compiles on llvm
Apr 15 2018, 2:53 AM
JonasToth added a comment to D41648: [clang-tidy] implement cppcoreguidelines macro rules.

I checked several codebases and implemented a little helper script to see which kind of macros exist. Then I added some filter regex as configuration and tried again, here are the results:

For https://github.com/nlohmann/json which is a very high quality codebase, the results were as expected: very clean, and good macro usage: (except a #define private public for tests)

Filter: JSON*|NLOHMANN*

CMake on the other hand uses many macros and don't obey CAPS_ONLY rules for all macros.

Filter: _FILE_OFFSET_BITS|AE_*|ARCHIVE_*|cal_*|CMAKE_*|cm*|CM_*|CPP_*|CURL*|E_*|exp_*|F90*|jp*|JSON_*|KW*|kw*|O_*|REQ_*|UV_*|YY*|yy*|Z_*

OpenCV isn't clean either, here the results:

Filter: ASSERT*|ALL*|CAL*|CC*|CALC*|calc*|CL*|cl*|CUDA*|CV*|cv*|EXPECT*|GTEST*|FUNCTOR*|HAVE*|ICV*|IPL*|IPP*|ipp*|__itt*|ITT*|JAS*|jas*|MESSAGE*|MAX*|OCL*|opengl*|OPENCV*|TYP*

libtorrent https://github.com/arvidn/libtorrent has reasonable macro usage

Filter: DEBUG*|LIBTORRENT*|TORRENT*|UNI*

LLVM lib/ defines many macros, almost all of them are ALL_CAPS

Filter: AARCH64*|X86*|ARM*|AMDGPU*|ASAN*|ATTR*|CHECK*|COMMON*|CV*|CXX*|DEBUG*|DEC*|DEFINE*|ESAN*|ENUM*|FMA*|FUZZER*|HANDLE*|INTERCEPTOR*|LSAN*|MATH*|MSAN*|OPENMP*|TSAN*|TYPE*|UBSAN*


LLVM tools/ is a similar story
Filter: ANALYSIS*|ASSERT*|CHECK*|DEBUG*|DECL*|DEPENDENT*|DIAG*|END*|ENUM*|GENERIC*|IMAGE*|KEYWORD*|LANG*|LLVM*|NON*|OBJC*|OPENMP*|OVERLOAD*|PROC*|REGISTER*|SANITIZER*|STMT*|TYPE*|X86*

@aaron.ballman Would you like to see other projects checked? I think this is a starting point for now.

My opinion based on what i see is

  • maybe two modes for this check make sense, having one requiring CAPS_ONLY and the currently implemented stricter check. This allows easier migration to safer macro usage
  • it is possible to reduce macro usage to a minimal amount, and the complex macros like AST stuff can be filtered with the regex. Furthermore, restricting all macros to a "macro namespace" is possible for sure.

    Things I would like to add to the check:
  • my little filtering script is valuable for developers, that want to address the macro issue. It should be added to the docs and everyone can make something based on that. It will be linux centered.
  • enforcing ALL_CAPS, including its usage
  • (adding a prefix to all macro, passing the filter, including its usage)

    Code transformation has the problems of scope and potentially breaking code badly, because clang-tidy wasn't run over all of the code.

The check is chatty, as expected, because macros in header files, especially central ones, pollute everything. That is the reason for the check, too.
Overall I am still in favor of this approach, seeing some obscure macros that should be replaced with actual language features (like overloading, .inline functions, constants, ...) in the checked codebases.

Apr 15 2018, 1:56 AM

Apr 14 2018

JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • [Feature] start working on handle semantic
Apr 14 2018, 1:56 PM
JonasToth updated the diff for D45444: [clang-tidy] WIP: implement new check for const-correctness.
  • [Feature] implement array and method access
  • [Feature] finalize value semantic
Apr 14 2018, 11:43 AM

Apr 11 2018

JonasToth committed rCTE329790: [clang-tidy] fix buildbots from hicpp-signed-bitwise.
[clang-tidy] fix buildbots from hicpp-signed-bitwise
Apr 11 2018, 3:28 AM
JonasToth committed rL329790: [clang-tidy] fix buildbots from hicpp-signed-bitwise.
[clang-tidy] fix buildbots from hicpp-signed-bitwise
Apr 11 2018, 3:27 AM
JonasToth closed D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.

Commit in https://reviews.llvm.org/rCTE329789

Apr 11 2018, 3:01 AM
JonasToth committed rCTE329789: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
[clang-tidy] add missing assignment operations in hicpp-signed-bitwise
Apr 11 2018, 2:57 AM
JonasToth committed rL329789: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
[clang-tidy] add missing assignment operations in hicpp-signed-bitwise
Apr 11 2018, 2:57 AM
JonasToth updated the diff for D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
  • remove shifting exception for standarized bitmask types
Apr 11 2018, 2:51 AM

Apr 10 2018

JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

It'll be good idea to have option to apply this check for pointer/references only, or include built-in types/enums.

Apr 10 2018, 10:22 AM
JonasToth added inline comments to D45468: [clang-tidy] Adding Fuchsia checker for human-readable logging.
Apr 10 2018, 10:18 AM · Restricted Project
JonasToth added inline comments to D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
Apr 10 2018, 10:01 AM
JonasToth added inline comments to D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
Apr 10 2018, 9:36 AM
JonasToth added a comment to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..

Sure. Is it OK to add a dependency from clang-tidy/bugprone/BugproneTidyModule.cpp to stuff in clang-tidy/cpp-coreguidelines ? Is there an existing example of this ?

Apr 10 2018, 12:21 AM · Restricted Project

Apr 9 2018

JonasToth added a comment to D45444: [clang-tidy] WIP: implement new check for const-correctness.

@aaron.ballman, @lebedev.ri, @alexfh and everyone else, i would love to hear your opinion on my approach. i never implemented a similar check and i might miss some cases, that need to be considered.

Apr 9 2018, 9:08 AM
JonasToth updated the summary of D45444: [clang-tidy] WIP: implement new check for const-correctness.
Apr 9 2018, 9:07 AM
JonasToth created D45444: [clang-tidy] WIP: implement new check for const-correctness.
Apr 9 2018, 9:05 AM
JonasToth added a comment to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..

Could you please add some tests that include user defined literals and there interaction with other literals. We should catch narrowing conversions from them, too.

Apr 9 2018, 7:41 AM · Restricted Project
JonasToth added inline comments to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..
Apr 9 2018, 6:59 AM · Restricted Project
JonasToth added a comment to D27621: [clang-tidy] check to find declarations declaring more than one name.
Apr 9 2018, 6:20 AM
JonasToth added inline comments to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..
Apr 9 2018, 4:13 AM · Restricted Project
JonasToth added a comment to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..

Is there anything I need to do for the diff to change state ? I

thought updating the code would automatically mark it "ready for review"
again.

Apr 9 2018, 4:03 AM · Restricted Project
JonasToth added a comment to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..

That sounds good.

Apr 9 2018, 2:31 AM · Restricted Project
JonasToth added a comment to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..

my 2 cents:

Apr 9 2018, 1:20 AM · Restricted Project

Apr 8 2018

JonasToth updated the diff for D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
  • fix std bitmask type shifting issue
Apr 8 2018, 7:54 AM
JonasToth created D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
Apr 8 2018, 7:38 AM

Apr 2 2018

JonasToth added a comment to D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY.

LGTM, but @aaron.ballman, @alexfh or someone else should review it before comitting.

Apr 2 2018, 11:32 PM · Restricted Project

Mar 31 2018

JonasToth added a comment to D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY.

Alright. Thank you for clarification :)

Mar 31 2018, 1:30 AM · Restricted Project

Mar 30 2018

JonasToth added a comment to D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY.

I'm not quite sure how we would go about that with confidence. The code we'd need to catch looks something like:

typeof(foo() == y) x;
/* snip */
bar(x == -1); // warning: comparison is pointless

If we could tell that x's type was inferred from a comparison op, we could warn here. However, if the user used x as anything but a C++ bool in /* snip */, the warning would be incorrect. We could maybe do some sort of range analysis by walking the AST, but that sounds like more like a static analyzer thing.

...And none of that would catch glibc's TEMP_FAILURE_RETRY macro, unless we wanted to apply said analysis to all integral variables.

Mar 30 2018, 1:59 PM · Restricted Project
JonasToth added a comment to D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY.

You noted, that the C++ warning would catch this case, but does not get triggered in C. Would it be wort to generalize the concern and have a warning that catch the comparison, regardless of the macro?

Mar 30 2018, 9:33 AM · Restricted Project

Mar 27 2018

JonasToth added inline comments to D33844: [clang-tidy] terminating continue check.
Mar 27 2018, 10:42 AM · Restricted Project
JonasToth added inline comments to D41648: [clang-tidy] implement cppcoreguidelines macro rules.
Mar 27 2018, 4:07 AM

Mar 26 2018

JonasToth added a comment to D41648: [clang-tidy] implement cppcoreguidelines macro rules.

Which checks do you have in mind?

Mar 26 2018, 9:12 AM
JonasToth updated the diff for D41648: [clang-tidy] implement cppcoreguidelines macro rules.
  • [Feature] implement CAPS_ONLY features, adjust docs
Mar 26 2018, 8:20 AM

Mar 25 2018

JonasToth added a comment to D41648: [clang-tidy] implement cppcoreguidelines macro rules.

I checked several codebases and implemented a little helper script to see which kind of macros exist. Then I added some filter regex as configuration and tried again, here are the results:

Mar 25 2018, 8:30 AM

Mar 24 2018

JonasToth added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 24 2018, 8:35 AM · Restricted Project
JonasToth updated the diff for D41648: [clang-tidy] implement cppcoreguidelines macro rules.
  • Merge branch 'master' into check_macros_usage
  • [Doc] update to new doc style
Mar 24 2018, 4:25 AM
JonasToth updated the diff for D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic.
  • update to trunk
  • [Doc] update to new doc style
Mar 24 2018, 4:21 AM

Mar 22 2018

JonasToth added a comment to D33844: [clang-tidy] terminating continue check.

I think this check could land in the bugprone module.

Mar 22 2018, 8:38 AM · Restricted Project
JonasToth added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 22 2018, 4:43 AM · Restricted Project

Mar 21 2018

JonasToth added reviewers for D44743: [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on Windows: aaron.ballman, alexfh, hokein.
Mar 21 2018, 10:41 AM · Restricted Project
JonasToth committed rL328108: [Fix] fix type deduction on ARM and MSVC.
[Fix] fix type deduction on ARM and MSVC
Mar 21 2018, 8:53 AM
JonasToth committed rCTE328108: [Fix] fix type deduction on ARM and MSVC.
[Fix] fix type deduction on ARM and MSVC
Mar 21 2018, 8:53 AM
JonasToth closed D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 21 2018, 8:43 AM
JonasToth added an edge to rCTE328107: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test: D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 21 2018, 8:42 AM
JonasToth added 1 commit(s) for D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test: rCTE328107: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 21 2018, 8:42 AM
JonasToth committed rCTE328107: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
[clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test
Mar 21 2018, 8:37 AM
JonasToth committed rL328107: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
[clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test
Mar 21 2018, 8:36 AM
JonasToth added inline comments to D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 21 2018, 8:33 AM
JonasToth updated the diff for D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
  • add fixme for degenerated switch
Mar 21 2018, 8:33 AM
JonasToth added inline comments to D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 21 2018, 7:28 AM
JonasToth updated the diff for D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
  • adress review comments
Mar 21 2018, 7:28 AM

Mar 18 2018

JonasToth updated the diff for D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
  • remove spurious debug iostream
Mar 18 2018, 7:36 AM
JonasToth updated the summary of D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 18 2018, 7:32 AM
JonasToth added a comment to D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.

I think the check is ready to land. I did check run it over LLVM and found some interesting code parts that could benefit. I extracted all the warnings and sorted them into the categories missing default/covered codepath(uncovered.txt), better use if/else(better_if.txt) and use if(mandatory_if.txt). Some warnings come from generated files but some live in usercode. In total there are 540 warnings.

Mar 18 2018, 7:32 AM
JonasToth updated the diff for D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
  • reorder check in release notes to get it in alphabetical order
Mar 18 2018, 7:28 AM
JonasToth updated the diff for D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
  • get the check working again
  • enable the big test
Mar 18 2018, 7:23 AM
JonasToth updated subscribers of D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.

Good news: The stack overflow seems to be fixed, by the patch r326624 from @rsmith (Thank you very much!).
Bad news: The check does not do its job anymore.... I try to fix the functionality problems.

Mar 18 2018, 5:24 AM
JonasToth added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 18 2018, 5:06 AM · Restricted Project
JonasToth added a comment to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..

The comment i added is actually wrong.
The range-based for just works anyway.
The VisitBindingDecl() is needed to get all the 'variables' declared in structured binding.
But as you can see in https://godbolt.org/g/be6Juf, the BindingDecl's are wrapped into DecompositionDecl.
And DecompositionDecl is actually inherited from VarDecl, https://github.com/llvm-mirror/clang/blob/b031fdc9b7dbd9c7f942d8060a4f00d63f3c9af2/include/clang/AST/DeclCXX.h#L3824-L3825,
so we count the DecompositionDecl in VisitVarDecl(), thus we need a VisitDecompositionDecl() that subtracts it.

Mar 18 2018, 5:04 AM · Restricted Project
JonasToth added a comment to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..

Looks fine to me, but Aaron or someone else must accept :)

Mar 18 2018, 4:49 AM · Restricted Project
JonasToth added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 18 2018, 3:08 AM · Restricted Project

Mar 8 2018

JonasToth added a comment to D44241: [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable.

The check is related to: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#cp44-remember-to-name-your-lock_guards-and-unique_locks

Mar 8 2018, 3:16 AM · Restricted Project
JonasToth retitled D44241: [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable from Add a check for constructing non-trivial types without assigning to a variable to [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable.
Mar 8 2018, 3:11 AM · Restricted Project

Mar 1 2018

JonasToth added a comment to D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.

After long inactivity (sorry!) i had a chance to look at it again:

Mar 1 2018, 10:44 AM

Feb 6 2018

JonasToth added reviewers for D42983: [clang-tidy] Add readability-simd-intrinsics check.: alexfh, aaron.ballman, hokein.
Feb 6 2018, 1:57 PM · Restricted Project

Jan 31 2018

JonasToth added inline comments to rC323665: [scan-build] Add an option to skip overriding CC and CXX make vars.
Jan 31 2018, 2:40 AM

Jan 22 2018

JonasToth added a comment to D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic.

The guideline authors will focus on mixing integer length and integer signdness.

Jan 22 2018, 1:43 PM

Jan 17 2018

JonasToth committed rCTE322626: [clang-tidy] implement check for goto.
[clang-tidy] implement check for goto
Jan 17 2018, 2:29 AM