Page MenuHomePhabricator

JonasToth (Jonas Toth)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 31 2016, 11:13 AM (296 w, 1 d)

Recent Activity

Wed, Jun 8

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Wed, Jun 8, 6:18 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Jun 7

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

ping :)
@njames93 I added more CHECK-FIXES and CHECK-FIXES-NOT statements in the tests.

Tue, Jun 7, 1:13 AM · Restricted Project, Restricted Project, Restricted Project

Jun 4 2022

JonasToth added inline comments to D127036: [clang-tidy] Warn about arrays in `bugprone-undefined-memory-manipulation`.
Jun 4 2022, 11:54 AM · Restricted Project, Restricted Project

May 29 2022

JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • addded CHECK-FIXES in clang-tidy tests
  • merged latest main into branch
May 29 2022, 2:48 AM · Restricted Project, Restricted Project, Restricted Project

May 20 2022

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

friendly ping :) (maybe @njames93 ?)

May 20 2022, 4:32 AM · Restricted Project, Restricted Project, Restricted Project

May 6 2022

JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix documentation reference
May 6 2022, 7:06 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
May 6 2022, 5:55 AM · Restricted Project, Restricted Project, Restricted Project

May 5 2022

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Thank you for the review! I adjusted the patch.

May 5 2022, 1:19 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • addressing review comments and remove unrelated changes
May 5 2022, 1:13 PM · Restricted Project, Restricted Project, Restricted Project

Apr 24 2022

JonasToth retitled D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables from [clang-tidy] implement const-transformation for misc-const-correctness to [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Apr 24 2022, 9:50 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix: remove clangAnalysis link in cppcoreguidelines and add it in misc
Apr 24 2022, 9:48 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth retitled D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables from [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness to [clang-tidy] implement const-transformation for misc-const-correctness.
Apr 24 2022, 9:46 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • refactor: rename check to 'misc-const-correctness' and adjust the tests accordingly
  • docs: adjust release notes and adjust check docs slightly
Apr 24 2022, 9:45 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D119481: run-clang-tidy: Fix infinite loop on windows.

Sorry for the long delay, i simply forgot.
The patch is commited! :)

Apr 24 2022, 8:18 AM · Restricted Project, Restricted Project
JonasToth committed rG3f0f20366622: run-clang-tidy: Fix infinite loop on windows (authored by JonasToth).
run-clang-tidy: Fix infinite loop on windows
Apr 24 2022, 8:18 AM · Restricted Project, Restricted Project
JonasToth closed D119481: run-clang-tidy: Fix infinite loop on windows.
Apr 24 2022, 8:18 AM · Restricted Project, Restricted Project

Mar 28 2022

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

ok. then i will continue under misc-const-correctness. thank you for the clarifications!

Mar 28 2022, 3:29 AM · Restricted Project, Restricted Project, Restricted Project

Mar 25 2022

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Sorry, for my own sanity, I've stopped reviewing C++ Core Guideline reviews for their diagnostic behavior until the guideline authors put effort into specifying realistic enforcement guidance.

Mar 25 2022, 5:18 AM · Restricted Project, Restricted Project, Restricted Project

Mar 20 2022

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

ping @aaron.ballman @njames93 :)

Mar 20 2022, 1:27 AM · Restricted Project, Restricted Project, Restricted Project

Mar 2 2022

JonasToth accepted D120331: [clang-tidy][run-clang-tidy.py] Add --config-file=<string> option.

LGTM, but please adjust the naming nit to a better name.

Mar 2 2022, 3:41 AM · Restricted Project, Restricted Project

Feb 22 2022

JonasToth added inline comments to D120331: [clang-tidy][run-clang-tidy.py] Add --config-file=<string> option.
Feb 22 2022, 2:51 PM · Restricted Project, Restricted Project

Feb 21 2022

JonasToth abandoned D54141: [clang-tidy] add deduplication support for run-clang-tidy.py.

won't happen anymore realistically.

Feb 21 2022, 9:26 AM · Restricted Project, Restricted Project
JonasToth accepted D119481: run-clang-tidy: Fix infinite loop on windows.

LGTM with a small nit.

Feb 21 2022, 9:23 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Another full run on LLVM with:

Feb 21 2022, 5:10 AM · Restricted Project, Restricted Project, Restricted Project

Feb 20 2022

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Feb 20 2022, 1:10 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • address reviews comments, part 1
  • Merge branch 'main' into feature_rebase_const_transform_20210808
  • fixing iterator-to-bool conversion and addressing other more review comments
Feb 20 2022, 1:08 PM · Restricted Project, Restricted Project, Restricted Project

Feb 7 2022

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Feb 7 2022, 12:25 AM · Restricted Project, Restricted Project, Restricted Project

Feb 4 2022

JonasToth added inline comments to D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer.
Feb 4 2022, 3:55 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

@aaron.ballman - can this land for Clang14, or does it have wait for 15?

Are there any other reviewers that can approve this?

Feb 4 2022, 2:44 AM · Restricted Project, Restricted Project, Restricted Project

Feb 2 2022

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Feb 2 2022, 7:07 AM · Restricted Project, Restricted Project, Restricted Project

Feb 1 2022

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Feb 1 2022, 1:52 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Feb 1 2022, 1:49 AM · Restricted Project, Restricted Project, Restricted Project

Jan 29 2022

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

ping @aaron.ballman just in case the patch is now down on the list, I am sorry for my high latency :(

Jan 29 2022, 12:30 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • use boolean for options
  • fix snafoo on arc usage
Jan 29 2022, 12:28 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • use boolean for option parsing
Jan 29 2022, 12:25 PM · Restricted Project, Restricted Project, Restricted Project

Jan 15 2022

JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix: adjust unit test for new array-pointer condition in range-based for loops
Jan 15 2022, 9:11 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix release note ordering
Jan 15 2022, 8:31 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • improve documentation a bit
Jan 15 2022, 8:30 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

addressed all outstanding review comments.

Jan 15 2022, 8:27 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • Merge branch 'main' into feature_rebase_const_transform_20210808
  • fix: address other review comments
  • remove one false positive with pointers in a range-based for loop on arrays
Jan 15 2022, 8:17 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Jan 15 2022, 7:21 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • Merge branch 'main' into feature_rebase_const_transform_20210808
  • fix: fixes for most review comments
Jan 15 2022, 7:20 AM · Restricted Project, Restricted Project, Restricted Project

Dec 15 2021

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Dec 15 2021, 7:14 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Thanks for pinging on this, it had fallen off my radar! @JonasToth -- did you ever get the chance to talk with @cjdb about the overlap mentioned in https://reviews.llvm.org/D54943#2950100? (The other review also seems to have stalled out, so I'm not certain where things are at.)

Dec 15 2021, 4:55 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

@aaron.ballman ping for review :)

Dec 15 2021, 4:38 AM · Restricted Project, Restricted Project, Restricted Project

Oct 7 2021

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

ping

Oct 7 2021, 11:43 AM · Restricted Project, Restricted Project, Restricted Project

Sep 5 2021

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

I analyzed the false positive and its probably not so simple to fix.

Sep 5 2021, 9:45 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • add reproducer for '__unaligned' bug
Sep 5 2021, 9:35 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

I am getting false positives with

struct S{};

void f(__unaligned S*);

void scope()
{
	S s;
	f(&s);
}
Sep 5 2021, 8:53 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • Merge branch 'main' into feature_rebase_const_transform_20210808
Sep 5 2021, 8:35 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • minor adjustments for comments
Sep 5 2021, 8:33 AM · Restricted Project, Restricted Project, Restricted Project

Aug 23 2021

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

thanks for your testing! i will look at the __unaligned issue, not sure if clang supports it, its an MSVC extension, is it?

Aug 23 2021, 1:16 AM · Restricted Project, Restricted Project, Restricted Project

Aug 17 2021

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

@JonasToth, @aaron.ballman suspects that there's enough overlap between this patch and D107873 to consider merging the two efforts. I'm happy to collaborate, but we should probably check that our goals are aligned. Are you active on the LLVM Discord? We could probably discuss a fair bit of this offline and then ping Aaron after we work out whether or not to do this.

Aug 17 2021, 11:38 AM · Restricted Project, Restricted Project, Restricted Project

Aug 15 2021

JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Aug 15 2021, 12:19 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

The check in the latest form can properly transform llvm/lib and clang/ and requires 28 manual fixes afterwards (values and references are transformed, no other modifications).
Some are good and not an issue with the analysis itself, some may or may not be an issue with the analysis itself. I think it is more a template meta programming thing.

Aug 15 2021, 12:16 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix: auto and type-dependent initializers fixed by ignoring them correctly in the matcher
  • fix docs on limitations
  • fix: deduplicate diagnostics from template instantiations
Aug 15 2021, 11:59 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth retitled D107900: [clang-tidy] Add a new clang-tidy check for trivially copyable types passed by const reference from Add a new clang-tidy check for trivially copyable types passed by const reference to [clang-tidy] Add a new clang-tidy check for trivially copyable types passed by const reference.
Aug 15 2021, 3:10 AM · Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • write documentation for const-analysis check
Aug 15 2021, 3:07 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth retitled D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables from WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness to [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Aug 15 2021, 1:12 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • Merge branch 'main' into feature_rebase_const_transform_20210808
Aug 15 2021, 1:11 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Using the checker now in our production BuildBot - no crashes and no false positives. Can't say if there are false negatives, but at any rate the checker is better than most colleagues at finding what should be declared const.

Aug 15 2021, 1:05 AM · Restricted Project, Restricted Project, Restricted Project

Aug 9 2021

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Whats left from my personal todo is adjusting the documentation.
I think then this check can work as linter and if you want as fixer as well, but this has to be enable explicitly.

Aug 9 2021, 12:22 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • remove transformation as default option, now it must be activated by the user explicitly
  • register only for C++
  • add a test-case for VLAs
Aug 9 2021, 12:20 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • retry upload of patch to be a diff to main
Aug 9 2021, 12:07 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • rebase to master
  • fix a crash where a scope matched but non of its variables, leading to nullptr dereference (found with the current test-suite)
  • remove outcommenting of tests that showed undesirable behavior
Aug 9 2021, 12:05 PM · Restricted Project, Restricted Project, Restricted Project

Aug 8 2021

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Can we get this in? I work in Microsoft Office and we have been using this checker and it works great! There are a couple of issues with it and I would like to contribute fixes.

Aug 8 2021, 4:05 AM · Restricted Project, Restricted Project, Restricted Project

Nov 13 2020

JonasToth accepted D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy.

LGTM! thanks for fixing.

Nov 13 2020, 10:06 AM · Restricted Project, Restricted Project

Oct 12 2020

JonasToth added reviewers for D75813: [clang-tidy] fix readability-braces-around-statements Stmt type dependency: njames93, JonasToth.
Oct 12 2020, 4:13 AM · Restricted Project, Restricted Project
JonasToth added a comment to D75813: [clang-tidy] fix readability-braces-around-statements Stmt type dependency.

Hey Alex, first thanks for the bug fixing! Of course we are interested in improvements in clang-tidy, but i think noone is actually employed to help out here and the normal reviewers have many, many reviews parallel. Sometimes stuff just slips through :/

Oct 12 2020, 4:13 AM · Restricted Project, Restricted Project

Oct 11 2020

JonasToth added a comment to D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs.

You can land it. Worst case would be post-commit comments, but this is not a complicated patch and should be fine!

Oct 11 2020, 8:44 AM · Restricted Project, Restricted Project
JonasToth accepted D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs.

I am fine now, thank you!

Oct 11 2020, 8:31 AM · Restricted Project, Restricted Project
JonasToth added a comment to D79113: Revert "Remove false positive in AvoidNonConstGlobalVariables.".

The issue is resolved now in the CppCoreGuidelines.

Oct 11 2020, 8:22 AM · Restricted Project
JonasToth added a comment to D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs.

The context thingie was not that important here, but still thanks :)

Oct 11 2020, 8:16 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs.
Oct 11 2020, 8:02 AM · Restricted Project, Restricted Project
JonasToth accepted D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs.

LGTM.
Short reminder to please use full context patches. Its not an issue right now, but review sometimes just needs the context to understand the changes :)

Oct 11 2020, 8:01 AM · Restricted Project, Restricted Project

Oct 10 2020

JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix test RUN line
Oct 10 2020, 5:43 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Oct 10 2020, 5:12 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • no delayed template parsing
  • adjust release note issue
Oct 10 2020, 5:11 AM · Restricted Project, Restricted Project, Restricted Project

Oct 9 2020

JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • missed one place of decltype
Oct 9 2020, 7:23 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • fix platform dependent warning message for decltype to just match the beginning and not the 'a.k.a'
Oct 9 2020, 6:43 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • address review comments
Oct 9 2020, 6:04 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
Oct 9 2020, 6:02 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.
  • update to landed ExprMutAnalyzer changes
Oct 9 2020, 5:09 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth committed rGe517e5cfec90: [clang] improve accuracy of ExprMutAnalyzer (authored by JonasToth).
[clang] improve accuracy of ExprMutAnalyzer
Oct 9 2020, 4:46 AM
JonasToth closed D88088: [clang] improve accuracy of ExprMutAnalyzer.
Oct 9 2020, 4:46 AM · Restricted Project
JonasToth added inline comments to D88088: [clang] improve accuracy of ExprMutAnalyzer.
Oct 9 2020, 4:16 AM · Restricted Project
JonasToth updated the diff for D88088: [clang] improve accuracy of ExprMutAnalyzer.
  • [Feature] add elvis operator detection
Oct 9 2020, 4:15 AM · Restricted Project

Oct 7 2020

JonasToth updated the diff for D88088: [clang] improve accuracy of ExprMutAnalyzer.
  • fix imprecisions
Oct 7 2020, 2:41 AM · Restricted Project

Oct 6 2020

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

@AlexanderLanin @0x8000-0000 i created the branch release-11-const (https://github.com/JonasToth/llvm-project/tree/release-11-const) in my fork.

This branch is based on 11-rc3 and cherry picks the commits that correspond to this revision.
I hope this is of any use for you! I will probably forget to update this branch all the time, but if I feel like there has been actual progress made, i will update!

Thank you Jonas - will add this to our CI tool for the new project and try to find some time to run it on the legacy project.

Just a quick update; in clang-tidy mode it works great, with no false positive and no crashes. I haven't tried the 'apply-replacements' mode.

Oct 6 2020, 2:53 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

rebase to newest expmutanalyzer patch

Oct 6 2020, 2:35 PM · Restricted Project, Restricted Project, Restricted Project
JonasToth retitled D88088: [clang] improve accuracy of ExprMutAnalyzer from WIP [clang] improve accuracy of ExprMutAnalyzer to [clang] improve accuracy of ExprMutAnalyzer.
Oct 6 2020, 2:32 PM · Restricted Project
JonasToth added a comment to D88088: [clang] improve accuracy of ExprMutAnalyzer.

@aaron.ballman I update the code a bit. This stuff is just a hydra :/

Oct 6 2020, 2:32 PM · Restricted Project
JonasToth updated the diff for D88088: [clang] improve accuracy of ExprMutAnalyzer.
  • document sections in the testcases, hopefully little more structure for comprehension
  • fix derived-to-base-cast OUTSIDE of an conditional operator
  • improve type-dependent callexpr, too
  • better canResolveToExpr matcher code
  • adjust matcher for comma
Oct 6 2020, 2:32 PM · Restricted Project
JonasToth added a comment to D54222: [clang-tidy] Add a check to detect returning static locals in public headers.

I am confused now, but richard knows this stuff very well! The patches you referenced showed only cases where the static was defined in an inline-header definition (and templates). Does this make a difference on the semantics?
This should be clear before we continue.

Oct 6 2020, 1:37 AM · Restricted Project, Restricted Project

Oct 5 2020

JonasToth retitled D88833: [clang-tidy] Do not warn on pointer decays in system macros from Do not warn on pointer decays in system macros to [clang-tidy] Do not warn on pointer decays in system macros.
Oct 5 2020, 10:51 AM · Restricted Project, Restricted Project

Sep 26 2020

JonasToth added a comment to D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables.

Off-Topic: I was just attempting to apply this to my codebase at work.
Seems this will be more challenging than anticipated 😉
My best guess is this is related to D72730

Applying fixes ...
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Sep 26 2020, 8:57 AM · Restricted Project, Restricted Project, Restricted Project

Sep 25 2020

JonasToth added a comment to D54222: [clang-tidy] Add a check to detect returning static locals in public headers.

I agree with @Eugene.Zelenko that this check should rather live in bugprone- as the issue its diagnosing is not LLVM specific. It is ok to add an alias into the llvm module.

Here are the warnings it issues with the patch's matcher:

clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:625:43: warning: address of static local variable 'tag' may not be identical across library boundaries [llvm-problematic-statics]
clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:219:1: warning: address of static local variable 'Index' may not be identical across library boundaries [llvm-problematic-statics]
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h:25:1: warning: address of static local variable 'Index' may not be identical across library boundaries [llvm-problematic-statics]

And here are the additional warnings it issues when relaxing the matcher (to be unless(isExpansionInMainFile())):

clang/lib/StaticAnalyzer/Checkers/Iterator.h:130:47: warning: address of static local variable 'Index' may not be identical across library boundaries [llvm-problematic-statics]
clang/lib/StaticAnalyzer/Checkers/Iterator.h:136:47: warning: address of static local variable 'Index' may not be identical across library boundaries [llvm-problematic-statics]
clang/lib/StaticAnalyzer/Checkers/Iterator.h:142:47: warning: address of static local variable 'Index' may not be identical across library boundaries [llvm-problematic-statics]
clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h:60:5: warning: address of static local variable 'index' may not be identical across library boundaries [llvm-problematic-statics]
llvm/utils/unittest/googletest/src/gtest.cc:3989:3: warning: address of static local variable 'instance' may not be identical across library boundaries [llvm-problematic-statics]

And also this one, which was hidden by default but made running tidy noisier by always saying there was a hidden warning:

/usr/bin/../include/c++/v1/functional:1960:9: warning: address of static local variable '__policy_' may not be identical across library boundaries [llvm-problematic-statics]

All of the first set of warnings might be actual problems, but the second set definitely aren't problems because they aren't going to be used across shared library boundaries. By making this be a LLVM-specific check, we can avoid the noise of these false positives. Also, I looked through the C++ Core Guidelines for any rules that might address this but didn't see anything relevant.

Thoughts?

Sep 25 2020, 10:14 AM · Restricted Project, Restricted Project
JonasToth updated the diff for D88088: [clang] improve accuracy of ExprMutAnalyzer.
  • fix typo that provided wrong argument to AST building
Sep 25 2020, 7:21 AM · Restricted Project
JonasToth updated the diff for D88088: [clang] improve accuracy of ExprMutAnalyzer.
  • address review comments
Sep 25 2020, 7:19 AM · Restricted Project

Sep 24 2020

JonasToth added inline comments to D88088: [clang] improve accuracy of ExprMutAnalyzer.
Sep 24 2020, 7:24 AM · Restricted Project