Page MenuHomePhabricator

JonasToth (Jonas Toth)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 31 2016, 11:13 AM (202 w, 6 d)

Recent Activity

Tue, Sep 15

JonasToth committed rG69f98311ca42: [ASTMatchers] extract public matchers from const-analysis into own patch (authored by JonasToth).
[ASTMatchers] extract public matchers from const-analysis into own patch
Tue, Sep 15, 12:08 PM
JonasToth closed D87588: [ASTMatchers] extract public matchers from const-analysis into own patch.
Tue, Sep 15, 12:08 PM · Restricted Project
JonasToth updated the diff for D87588: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • rebase
Tue, Sep 15, 12:06 PM · Restricted Project

Mon, Sep 14

JonasToth updated the diff for D87588: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • fix compilation error from removed brace
Mon, Sep 14, 9:14 AM · Restricted Project

Sun, Sep 13

JonasToth updated the diff for D87588: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • fix left over merge marker and one formatting problem
Sun, Sep 13, 10:44 AM · Restricted Project
JonasToth requested review of D87588: [ASTMatchers] extract public matchers from const-analysis into own patch.
Sun, Sep 13, 10:39 AM · Restricted Project
JonasToth accepted D72553: [clang-tidy] Add performance-prefer-preincrement check.

Sorry for missing this review, i simply hadn't time :/
All my concerns are addressed and I think this is LGTM after rebasing.

Sun, Sep 13, 3:48 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54222: [clang-tidy] Add a check to detect returning static locals in public headers.

ping.
This checks seems pretty much done. @jranieri-grammatech do you think there is something missing? Otherwise it could be rebased and comitted?

Sun, Sep 13, 3:20 AM · Restricted Project
JonasToth resigned from D72730: [clang-tidy] run-clang-tidy -export-fixes exports only fixes, not all warnings.
Sun, Sep 13, 3:07 AM · Restricted Project, Restricted Project
JonasToth resigned from D74813: Function block naming - add hash of parameter type to end of block name.
Sun, Sep 13, 2:56 AM · Restricted Project, Restricted Project
JonasToth added a comment to D75107: [clang-tidy] hicpp-signed-bitwise IgnorePositiveIntegerLiterals now partially recursive.

ping.
@njames93 are you revisiting this patch? What is the missing piece? Maybe i can help out a bit?

Sun, Sep 13, 2:55 AM · Restricted Project

Thu, Sep 10

JonasToth accepted D82784: [clang-tidy] For `run-clang-tidy.py` do not treat `allow_enabling_alpha_checkers` as a none value..

LGTM

Thu, Sep 10, 2:58 AM · Restricted Project

Jun 16 2020

JonasToth added a comment to D81923: [clang-tidy] Add modernize-use-ranges check..

great to see such a check!

Jun 16 2020, 4:58 AM · Restricted Project

Jan 30 2020

JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

This generated 56 "const const" declarations, of which 25 were triple const!

Jan 30 2020, 11:58 AM · Restricted Project, Restricted Project

Jan 25 2020

JonasToth added a comment to D73203: [clang-tidy] Prevent a remove only fixit causing a conflict when enclosed by another fixit.

We need tests for that. There should be tests for the exporting-feature. Maybe they could provide a good starting point on adding tests. (not sure if there is unit-test code for isolated testing, but some tests do exist!)

Jan 25 2020, 12:57 PM · Restricted Project, Restricted Project
JonasToth added a comment to D72553: [clang-tidy] Add performance-prefer-preincrement check.

Yeah, the libc++ failures are not your fault :)
My 2 cents added.

Jan 25 2020, 12:48 PM · Restricted Project, Restricted Project

Jan 20 2020

JonasToth added inline comments to D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved.
Jan 20 2020, 9:02 AM · Restricted Project, Restricted Project

Jan 19 2020

JonasToth added a comment to D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements.

Is this good to land and if so anyone able to commit?

Jan 19 2020, 11:58 PM · Restricted Project, Restricted Project

Jan 13 2020

JonasToth added a comment to D72630: [clang-tidy] Ignore implicit casts in modernize-use-default-member-init.

K. Thank you for fixing it!

Jan 13 2020, 2:11 PM · Restricted Project
JonasToth accepted D72630: [clang-tidy] Ignore implicit casts in modernize-use-default-member-init.

LGTM in general. The linked bug report misses a "4" --> PR44440, so please the description for that.

Jan 13 2020, 1:24 PM · Restricted Project

Jan 11 2020

JonasToth updated subscribers of rG4c48ea68e491: [ASTMatchers] extract public matchers from const-analysis into own patch.

@gkistanova Do you know the toolchain on the power-pc builders? I get an ICE with this patch (see the prior commit) and would like to find out whats the problem. Thanks for your time!

Jan 11 2020, 11:03 AM
JonasToth committed rG23a799adf0ab: Revert "[ASTMatchers] extract public matchers from const-analysis into own… (authored by JonasToth).
Revert "[ASTMatchers] extract public matchers from const-analysis into own…
Jan 11 2020, 10:44 AM
JonasToth added a reverting change for rG4c48ea68e491: [ASTMatchers] extract public matchers from const-analysis into own patch: rG23a799adf0ab: Revert "[ASTMatchers] extract public matchers from const-analysis into own….
Jan 11 2020, 10:44 AM
JonasToth added a comment to rG4c48ea68e491: [ASTMatchers] extract public matchers from const-analysis into own patch.

The powerpc buildbots get an internal compiler error and crash. No Idea why, reverted for now.

Jan 11 2020, 10:44 AM
JonasToth committed rG4c48ea68e491: [ASTMatchers] extract public matchers from const-analysis into own patch (authored by JonasToth).
[ASTMatchers] extract public matchers from const-analysis into own patch
Jan 11 2020, 10:26 AM
JonasToth closed D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
Jan 11 2020, 10:26 AM · Restricted Project
JonasToth updated the diff for D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • remove merge conflict markers in docs
Jan 11 2020, 10:08 AM · Restricted Project
JonasToth updated the diff for D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • fix compilation error, missing getType
Jan 11 2020, 10:08 AM · Restricted Project
JonasToth updated the diff for D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • add test for K&R functions
Jan 11 2020, 9:51 AM · Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

Thank you for looking into this; I'll start building diff14 to test locally.

Jan 11 2020, 9:33 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72362: [clang-tidy] misc-no-recursion: a new check.

So that is were the CTU question comes from? :)

Jan 11 2020, 9:33 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72239: [clang-tidy] new opencl recursion not supported check.

The other recursion check seems more sophisticated. What is your take on it? Would you consider it better as well, what is your opinion on it?

Jan 11 2020, 8:57 AM · Restricted Project, Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

@0x8000-0000 i did remove dependentTypes from matching. Locally that works with your reported test-case (i was running clang-tidy wrong :().

Jan 11 2020, 8:37 AM · Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • fix false positive with ignoring dependentTypes
Jan 11 2020, 8:28 AM · Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • remove pointee-analysis artifacts as this will be done later
  • remove unnecessary comments
Jan 11 2020, 8:10 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

Here is a minimal example that shows the problem:

#include <memory>

template<typename SomeValue>
struct DoGooder
{
    DoGooder(void* accessor, SomeValue value)
    {
    }

};

struct Bingus
{
    static constexpr auto someRandomConstant = 99;
};

template<typename Foo>
struct HardWorker
{
    HardWorker()
    {
        const DoGooder anInstanceOf{nullptr, Foo::someRandomConstant};
    }
};

struct TheContainer
{
    std::unique_ptr<HardWorker<Bingus>> m_theOtherInstance;
};

Example run:

$ /opt/clang10/bin/clang-tidy -checks="-*,cppcoreguidelines-const-correctness" -header-filter=".*" reproconst.cpp -- -std=c++17 -Wall
54 warnings generated.
reproconst.cpp:22:9: warning: variable 'anInstanceOf' of type '<dependent type>' can be declared 'const' [cppcoreguidelines-const-correctness]
        const DoGooder anInstanceOf{nullptr, Foo::someRandomConstant};
        ^
                       const
Suppressed 53 warnings (53 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
Jan 11 2020, 2:23 AM · Restricted Project, Restricted Project

Jan 10 2020

JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

Applied the fix-it on one of our smaller (but C++ code bases) and it builds and passes the tests. Comments:

  1. I'm still seeing some false positives, where some locals that are const are flagged as could be made const - I'm working to create a minimal reproduction recipe.
  2. We're a west const shop :) so adding a bunch of east-consts will not fly well. Is there a way to configure where 'const' is placed by the fixit? (Specifically 'auto const', we prefer it 'const auto').
Jan 10 2020, 3:20 PM · Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • test if references to pointers are ignored if pointers are ignored as values
  • add different possible auto constellations
  • document the problematic cases for 'auto' deductions
Jan 10 2020, 8:48 AM · Restricted Project, Restricted Project
JonasToth updated the diff for D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
  • address review comments
Jan 10 2020, 8:15 AM · Restricted Project
JonasToth added inline comments to D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
Jan 10 2020, 8:15 AM · Restricted Project
JonasToth committed rGcdd05f2aea3b: [NFC] format unittest for ExprMutAnalyzer (authored by JonasToth).
[NFC] format unittest for ExprMutAnalyzer
Jan 10 2020, 7:15 AM
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • fix unit tests for exprmutanalyzer, whitespace was the problem
  • Merge branch 'master' into feature_transform_const.patch
Jan 10 2020, 7:15 AM · Restricted Project, Restricted Project
JonasToth created D72505: [ASTMatchers] extract public matchers from const-analysis into own patch.
Jan 10 2020, 6:55 AM · Restricted Project

Jan 9 2020

JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • Merge branch 'master' into feature_transform_const.patch
  • actually dismiss function references
  • work on exclusion of variables that have type, autotype or reference-type to template parameter
  • by default analyze the pointers and transform as well, for testing
  • fix canResolveToExpr to account for derivedToBaseClass casts
  • restore unit tests for expr mut analyzer - there was an oversight in my build that lead them not being running
  • short id for matcher
  • fix test for fixed false negative
  • rip out unused matchers that are now unnecessary
  • try to ignore auto-types that are type-dependent
  • consider 'static_cast<Type&>()' always a mutation, speculativly fix tests for that
Jan 9 2020, 11:29 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72438: [clang-tidy] For checker `readability-misleading-indentation` update tests..

I'll point out that with this approach we lose all test coverage of the checker with delayed template parsing on, even though most of the test works in that mode and delayed template parsing is the default when targeting windows.

Jan 9 2020, 5:21 AM · Restricted Project, Restricted Project
JonasToth accepted D72438: [clang-tidy] For checker `readability-misleading-indentation` update tests..

LGTM.
This check already existed in clang-tidy and had a bug. So we should fix that (thank you for that) and probably even backport (release coming soon).
So even though clang itself might be able to do it, clang-tidy should do it properly as well.

Jan 9 2020, 2:26 AM · Restricted Project, Restricted Project

Jan 8 2020

JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

I did evaluate the performance of the check on LLVM with the script in the attachement.

Jan 8 2020, 4:14 PM · Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 8 2020, 2:42 PM · Restricted Project, Restricted Project
JonasToth added a comment to D72333: [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check..

Adding a -fno-delayed-template-parsing to the RUN-line should suffice.

Jan 8 2020, 2:32 PM · Restricted Project, Restricted Project
JonasToth added a comment to D72282: [clang-tidy] Add `bugprone-unintended-adl`.

@Quuxplusone thank you for the input! I think it is a good idea if the library-implementors take a look at it. I myself don't have enough knowledge of C++ and the libraries to judge all this stuff.
So who to ping or to add as reviewer?

Jan 8 2020, 2:23 PM · Restricted Project, Restricted Project
JonasToth added inline comments to D72282: [clang-tidy] Add `bugprone-unintended-adl`.
Jan 8 2020, 7:12 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72217: [clang-tidy] Added readability-qualified-auto check.
Jan 8 2020, 6:25 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72217: [clang-tidy] Added readability-qualified-auto check.

What do you think about volatile qualifiers. Personally I don't think its important to qualify an volatile on a pointer that is volatile, but i should adhere to the decl being declared as volatile

volatile auto X = getPointer();
//transform to
auto *X volatile = getPointer();

auto X = getVolatilePointer();
//transform to
auto *X = getVolatilePointer();
Jan 8 2020, 6:16 AM · Restricted Project, Restricted Project
JonasToth accepted D72333: [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check..

LGTM! Thank you for fixing this issue. Can you please update the bug report as well?

Jan 8 2020, 6:08 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72217: [clang-tidy] Added readability-qualified-auto check.

By the word, will be interesting to see results of this check run on LLVM code. Probably results should be split on modules.

So ran it on clang and clang-tidy just crashed, gonna debug it see whats happening

Crash fixed heres what happened when I ran it on clang/lib

Quite a few occurances of const auto Decl which are renamed as const auto* const, or worse still a few that are redeclared as auto *const

/home/nathan/src/llvm-project/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp:623:3: warning: 'const auto IC' can be declared as 'const auto *const IC' [readability-qualified-auto]
  const auto IC = dyn_cast<CXXInstanceCall>(&Call);
  ^~~~~~~~~~~
  const auto *const 
/home/nathan/src/llvm-project/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp:636:3: warning: 'const auto MethodDecl' can be declared as 'const auto *const MethodDecl' [readability-qualified-auto]
  const auto MethodDecl = dyn_cast_or_null<CXXMethodDecl>(IC->getDecl());
  ^~~~~~~~~~~
  const auto *const

286 files changed, without looking at header files. One file failed to build which is due to a dependant template. My guess is one call will have returned a naked pointer, and another returned an iterator, maybe I should disregard dependant templates unless it would be possible to deduce its always a pointer

Jan 8 2020, 5:48 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72378: [clang-tidy] Add `bugprone-reserved-identifier`.
Jan 8 2020, 2:11 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72282: [clang-tidy] Add `bugprone-unintended-adl`.
Jan 8 2020, 2:02 AM · Restricted Project, Restricted Project

Jan 7 2020

JonasToth added inline comments to D72217: [clang-tidy] Added readability-qualified-auto check.
Jan 7 2020, 9:46 AM · Restricted Project, Restricted Project
JonasToth added reviewers for D72333: [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check.: aaron.ballman, hokein.
Jan 7 2020, 9:18 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72333: [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check..
Jan 7 2020, 9:18 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72282: [clang-tidy] Add `bugprone-unintended-adl`.
Jan 7 2020, 9:08 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming.

i am still fine with the patch. if no one else has objections, i think this can land.

Jan 7 2020, 8:39 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72217: [clang-tidy] Added readability-qualified-auto check.
Jan 7 2020, 8:30 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming.
Jan 7 2020, 8:21 AM · Restricted Project, Restricted Project

Jan 6 2020

JonasToth added inline comments to D72282: [clang-tidy] Add `bugprone-unintended-adl`.
Jan 6 2020, 12:42 PM · Restricted Project, Restricted Project
JonasToth accepted D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming.
Jan 6 2020, 12:42 PM · Restricted Project, Restricted Project
JonasToth added a comment to D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming.

I guess all the tests run?
I think this LGTM after the nits are adressed.

Jan 6 2020, 12:33 PM · Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • fix false positive with parenListExpr, dont match so narrow for them
  • try removing more false positives, does not work
Jan 6 2020, 5:56 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • Merge branch 'master' into feature_transform_const.patch
  • link clangAnalysis to the cppcoreguidelines-module
  • fix InitListExpr as well

This last version too builds with RelWithDebInfo and fails with Debug configuration (both clean builds).

Jan 6 2020, 2:17 AM · Restricted Project, Restricted Project

Jan 5 2020

JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • Merge branch 'master' into feature_transform_const.patch
  • link clangAnalysis to the cppcoreguidelines-module
  • fix InitListExpr as well
Jan 5 2020, 12:16 PM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

I can't build this on top of current llvm-project tree (6a6e6f04ec2cd2f4f07ec4943036c5c2d47ce0c7):

/usr/bin/ld: lib/libclangTidyCppCoreGuidelinesModule.a(ConstCorrectnessCheck.cpp.o): in function `clang::tidy::cppcoreguidelines::ConstCorrectnessCheck::registerMatchers(clang::ast_matchers::MatchFinder*)':
/home/florin/tools/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:65: undefined reference to `clang::ast_matchers::decompositionDecl'

I am building using clang++-9 from Debian, and diff7 applied cleanly.

Jonas, is it possible to rebase this on top of llvm-project and push it to a branch on https://github.com/JonasToth/llvm-project ?

I just merged master into the branch and pushed to feature_transform_const.patch branch in my fork. Maybe that works?
If you want you can join IRC, its faster to get this fixed there :)

Strange - I have checked out your branch, and the patch is correct (no difference between when I apply the phabricator diff7 on top of upstream llvm-project and when i look at feature_transform_const.patch)

I am using the following cmake configuration:

cmake ../llvm \
   -DCMAKE_INSTALL_PREFIX=/opt/clang10 \
   -DCMAKE_C_COMPILER=/usr/bin/clang-9 \
   -DCMAKE_CXX_COMPILER=/usr/bin/clang++-9 \
   -DCMAKE_BUILD_TYPE=Debug \
   -DLLVM_TARGETS_TO_BUILD=X86 \
   -DLLVM_ENABLE_THREADS=On \
   -DLLVM_INSTALL_TOOLCHAIN_ONLY=On \
   -DLLVM_USE_SPLIT_DWARF=On \
   -DLLVM_BUILD_TESTS=ON \
   -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;clang-tools-extra;" \
   -GNinja

What cmake configuration are you using?

(Sorry - I need to go, no time for IRC today)

Jan 5 2020, 11:07 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

I can't build this on top of current llvm-project tree (6a6e6f04ec2cd2f4f07ec4943036c5c2d47ce0c7):

/usr/bin/ld: lib/libclangTidyCppCoreGuidelinesModule.a(ConstCorrectnessCheck.cpp.o): in function `clang::tidy::cppcoreguidelines::ConstCorrectnessCheck::registerMatchers(clang::ast_matchers::MatchFinder*)':
/home/florin/tools/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:65: undefined reference to `clang::ast_matchers::decompositionDecl'

I am building using clang++-9 from Debian, and diff7 applied cleanly.

Jonas, is it possible to rebase this on top of llvm-project and push it to a branch on https://github.com/JonasToth/llvm-project ?

Jan 5 2020, 10:39 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72217: [clang-tidy] Added readability-qualified-auto check.

+1 for the check from me as well :)

Jan 5 2020, 10:39 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

clang/lib almost transforms cleanly.
issues still left:

  • InitListExpr can initialize non-const references. Such cases are not figured out yet (see create_false_positive at the end of the testcases)
  • I found a case in clang, where const was correctly added to a variable, but that variable was used in a conditional operator (foo ? const_var : non_const_var) which broke compilation. I will not fix this, as this is extremly rare (I suppose) and in a sense defeats the purpose of our analysis. I think something like this should be fixed by hand with a NOLINT.
Jan 5 2020, 10:12 AM · Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • find more false positives
  • fix false positive with refernces to containers in range-for. This introduces false negative though
  • new test-case for check
  • fix range-for iterator speciality; start working on complex conditional and comma-operator expression that result in a mutation on a variable
  • ignore implicit casts for member-call expr
  • fix another false positive in typeDependent contexts and memberExpr instead of cxxMemberCallExpr
  • add test for overloaded operator>>
  • add test for templated operator>>
  • another case fixed
  • add test for member access in for loop init
  • fix false positive with member access with implicit cast between sub and base-class
  • address explicit cast to references of an element
Jan 5 2020, 10:03 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 5 2020, 5:08 AM · Restricted Project, Restricted Project

Jan 4 2020

JonasToth added a comment to D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names.

i think it would be easier to review if there are two patches, one refactoring and one new check.

Jan 4 2020, 2:50 PM · Restricted Project, Restricted Project
JonasToth added a comment to D56644: [clang-tidy] readability-container-size-empty handle std::string length().

any news here? do you plan to finish this patch @Quolyk ?
Do you mind if someone comandeers this patch?

Jan 4 2020, 2:41 PM · Restricted Project, Restricted Project
JonasToth resigned from D36836: [clang-tidy] Implement sonarsource-function-cognitive-complexity check.
Jan 4 2020, 2:41 PM · Restricted Project, Restricted Project
JonasToth resigned from D69746: [analyzer] FixItHint: Apply and test hints with the Clang-Tidy's script.
Jan 4 2020, 2:41 PM · Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 4 2020, 2:32 PM · Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 4 2020, 10:52 AM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

This patch does not build on top of current tree:

/usr/bin/ld: lib/libclangTidyCppCoreGuidelinesModule.a(ConstCorrectnessCheck.cpp.o): in function `clang::tidy::cppcoreguidelines::ConstCorrectnessCheck::registerMatchers(clang::ast_matchers::MatchFinder*)':
/home/florin/tools/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:65: undefined reference to `clang::ast_matchers::decompositionDecl'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[2771/4997] Building CXX object tools/clang/tools/extra/clang-include-fixer/find-all-symbols/CMakeFiles/obj.findAllSymbols.dir/PragmaCommentHandler.cpp.o
ninja: build stopped: subcommand failed.

This is my top of the tree right now:

b7ecf1c1c373c53183ef6ef66efbe4237ff7b96d (origin/master, origin/HEAD, master) NFC: Fix trivial typos in comments
Jan 4 2020, 10:14 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 4 2020, 7:31 AM · Restricted Project, Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 4 2020, 7:27 AM · Restricted Project, Restricted Project

Jan 3 2020

JonasToth committed rG48ee04033cce: [clang-tidy] fix linkage with clangSema for FixitHintUtils, undo previous wrong… (authored by JonasToth).
[clang-tidy] fix linkage with clangSema for FixitHintUtils, undo previous wrong…
Jan 3 2020, 1:32 PM
JonasToth updated subscribers of rGfed2a5033af5: [clang-tidy] quickfix: add -fno-delayed-template-parsing as default argument….

@aaron.ballman @alexfh i find this change useful, as there would always be an issue with templates in the unit-test code and msvc environments. Without this default argument each runCheckOnCode<>(Code, ....) would require 4 arguments as the additional options is the 4th default-argument.
If this is not ok, it can be reverted. That will break the unit-test for the const-utility.

Jan 3 2020, 1:11 PM
JonasToth committed rGfed2a5033af5: [clang-tidy] quickfix: add -fno-delayed-template-parsing as default argument… (authored by JonasToth).
[clang-tidy] quickfix: add -fno-delayed-template-parsing as default argument…
Jan 3 2020, 1:02 PM
JonasToth committed rG05ebaa62e0db: [clang-tidy] fix broken linking for AddConstTest with adding clangSema as… (authored by JonasToth).
[clang-tidy] fix broken linking for AddConstTest with adding clangSema as…
Jan 3 2020, 1:02 PM
JonasToth added a comment to D54395: [clang-tidy] implement utility-function to add 'const' to variables.

This breaks tests on Windows: http://45.33.8.238/win/5061/step_8.txt

Please take a look, and if takes a while to investigate, please revert in the meantime. (Probably needs the fno-delayed-template-instantiation kludge that's in many other tests.)

Jan 3 2020, 1:01 PM · Restricted Project
JonasToth added inline comments to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
Jan 3 2020, 12:01 PM · Restricted Project, Restricted Project
JonasToth added a comment to D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.

shows a couple of false positives.

Jan 3 2020, 12:01 PM · Restricted Project, Restricted Project
JonasToth updated the diff for D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness.
  • ignore implicit casts in memberExpr(hasObjectExpression())
  • implement functionality for function pointers
Jan 3 2020, 12:01 PM · Restricted Project, Restricted Project
JonasToth added a comment to D54395: [clang-tidy] implement utility-function to add 'const' to variables.

Thank you for all the review over the time this took to land! :)

Jan 3 2020, 11:41 AM · Restricted Project
JonasToth committed rGcf48101200ee: [clang-tidy] implement utility-function to add 'const' to variables (authored by JonasToth).
[clang-tidy] implement utility-function to add 'const' to variables
Jan 3 2020, 11:41 AM
JonasToth closed D54395: [clang-tidy] implement utility-function to add 'const' to variables.
Jan 3 2020, 11:41 AM · Restricted Project
JonasToth added inline comments to D54395: [clang-tidy] implement utility-function to add 'const' to variables.
Jan 3 2020, 10:53 AM · Restricted Project
JonasToth added a comment to D72121: [clang-tidy] Fix readability-identifier-naming missing member variables .

Ahh clang format script must have run, I'll undo that. I've not tried running it against the whole of llvm as I don't know what the easy way to do that is, especially given that llvm disregards it's standard naming convention for old projects and stl like containers. The comment is just in relation to the bug report that this fix is based on, could probably go

Jan 3 2020, 10:43 AM · Restricted Project, Restricted Project
JonasToth added a comment to D72121: [clang-tidy] Fix readability-identifier-naming missing member variables .

Thank you for fixing these bugs!
Did you try running the check of clang/llvm again, to see if there are still missing cases of this?

Jan 3 2020, 5:14 AM · Restricted Project, Restricted Project

Jan 2 2020

JonasToth added inline comments to D54395: [clang-tidy] implement utility-function to add 'const' to variables.
Jan 2 2020, 1:27 PM · Restricted Project