Page MenuHomePhabricator

mgehre (Matthias Gehre)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 28 2015, 1:40 PM (270 w, 3 d)

Recent Activity

Jun 3 2020

mgehre added a comment to D77572: [clang-tidy] add new check readability-use-anyofallof.

Sorry for breaking the build and thanks for the fixes!

Jun 3 2020, 10:25 AM · Restricted Project, Restricted Project
mgehre committed rGadd51e152aa6: [clang-tidy] add new check readability-use-anyofallof (authored by mgehre).
[clang-tidy] add new check readability-use-anyofallof
Jun 3 2020, 3:49 AM
mgehre closed D77572: [clang-tidy] add new check readability-use-anyofallof.
Jun 3 2020, 3:48 AM · Restricted Project, Restricted Project
mgehre updated the diff for D77572: [clang-tidy] add new check readability-use-anyofallof.

Implemented njames93's comments

Jun 3 2020, 3:48 AM · Restricted Project, Restricted Project

Jun 2 2020

mgehre added inline comments to D80301: [yaml][clang-tidy] Fix multiline YAML serialization.
Jun 2 2020, 11:32 AM · Restricted Project, Restricted Project, Restricted Project

May 25 2020

mgehre updated the diff for D77572: [clang-tidy] add new check readability-use-anyofallof.

Fix comments

May 25 2020, 3:33 PM · Restricted Project, Restricted Project
mgehre added a comment to D77572: [clang-tidy] add new check readability-use-anyofallof.

Aaron, thank you very much for taking the time to review this PR.

May 25 2020, 3:33 PM · Restricted Project, Restricted Project

May 21 2020

mgehre added a comment to D80301: [yaml][clang-tidy] Fix multiline YAML serialization.

Thanks for doing this! I didn't work on the YAML parser before, so I cannot give formal approval.

May 21 2020, 2:05 PM · Restricted Project, Restricted Project, Restricted Project

May 14 2020

mgehre added a comment to D77572: [clang-tidy] add new check readability-use-anyofallof.

Ping :-)
I'm looking for directions on what the next steps are.

May 14 2020, 12:30 PM · Restricted Project, Restricted Project

May 4 2020

mgehre added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

Could be - did it handle it correctly for your include case here?

May 4 2020, 4:14 AM · Restricted Project

Apr 30 2020

mgehre added a comment to D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value.

This change breaks modernize-use-using fixits.
The code
typedef int A, B;
is replaced into

using A = int;
using B = int;

when directly applying fixits with clang-tidy. But it is replaced into

using A = int;
Apr 30 2020, 2:32 PM · Restricted Project

Apr 27 2020

mgehre committed rG145dcef8bdf9: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName (authored by mgehre).
[clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName
Apr 27 2020, 5:52 AM
mgehre closed D77979: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName.
Apr 27 2020, 5:52 AM · Restricted Project

Apr 17 2020

mgehre committed rG0642e5e7a7e5: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword (authored by mgehre).
[clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword
Apr 17 2020, 2:08 AM
mgehre closed D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword.
Apr 17 2020, 2:08 AM · Restricted Project
mgehre added inline comments to D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup.
Apr 17 2020, 2:07 AM · Restricted Project

Apr 16 2020

mgehre added a comment to D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.

Hi @vsk, sorry, I pushed that branch by accident to the wrong remote.

Apr 16 2020, 12:14 PM · Restricted Project
mgehre committed rG6d2f73f821ed: Revert "Revert "[LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef"" (authored by mgehre).
Revert "Revert "[LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef""
Apr 16 2020, 5:37 AM
mgehre added a reverting change for rGbac85ab3b55d: Revert "[LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef": rG6d2f73f821ed: Revert "Revert "[LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef"".
Apr 16 2020, 5:37 AM
mgehre closed D78290: Move [[gsl::Pointer]] into llvm/include/llvm/Support/Compiler.h.

Committed as 6d2f73f821ed5ea584869924b150ac2e6e65c12e

Apr 16 2020, 5:36 AM · Restricted Project
mgehre updated the diff for D78290: Move [[gsl::Pointer]] into llvm/include/llvm/Support/Compiler.h.

Fix typo

Apr 16 2020, 3:56 AM · Restricted Project
mgehre created D78290: Move [[gsl::Pointer]] into llvm/include/llvm/Support/Compiler.h.
Apr 16 2020, 3:56 AM · Restricted Project
mgehre added a comment to D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.

PR is here: https://reviews.llvm.org/D78290

Apr 16 2020, 3:56 AM · Restricted Project
mgehre added a comment to D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.

I'll add it to Compiler.h

Apr 16 2020, 3:56 AM · Restricted Project

Apr 15 2020

mgehre committed rG83d5131d87a6: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef (authored by mgehre).
[LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef
Apr 15 2020, 11:27 PM
mgehre closed D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.
Apr 15 2020, 11:26 PM · Restricted Project
mgehre committed rG79060d2ea122: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef (authored by mgehre).
[LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef
Apr 15 2020, 3:28 PM
mgehre updated the diff for D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword.

Implement review comments (Thanks!)

Apr 15 2020, 11:30 AM · Restricted Project

Apr 14 2020

mgehre added a comment to D77572: [clang-tidy] add new check readability-use-anyofallof.

Thanks for the comments so far.
I'm a bit lost now. Which changes that cannot wait for the next PR do you see necessary to get this check merged?

Apr 14 2020, 2:04 PM · Restricted Project, Restricted Project
mgehre updated the summary of D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword.
Apr 14 2020, 2:04 PM · Restricted Project
mgehre created D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword.
Apr 14 2020, 12:24 PM · Restricted Project

Apr 12 2020

mgehre created D77979: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName.
Apr 12 2020, 12:16 PM · Restricted Project

Apr 10 2020

mgehre added a comment to D77572: [clang-tidy] add new check readability-use-anyofallof.

Thanks @njames93, this is a good examples which I did not consider yet. I agree that only transforming
the second loop would make the code worse.

Apr 10 2020, 2:32 PM · Restricted Project, Restricted Project

Apr 9 2020

mgehre committed rGeaa55590945a: [clang-tidy] misc-unused-parameters: Don't remove parameter from lambda (authored by mgehre).
[clang-tidy] misc-unused-parameters: Don't remove parameter from lambda
Apr 9 2020, 1:14 PM
mgehre closed D77680: [clang-tidy] misc-unused-parameters: Don't remove parameter from lambda.
Apr 9 2020, 1:14 PM · Restricted Project, Restricted Project

Apr 8 2020

mgehre added a comment to D77680: [clang-tidy] misc-unused-parameters: Don't remove parameter from lambda.

Outright disabling for lambdas probably isn't the ideal solution, however it's at least a good stepping stone til a better solution can be found.

Apr 8 2020, 5:23 AM · Restricted Project, Restricted Project

Apr 7 2020

mgehre updated the summary of D77680: [clang-tidy] misc-unused-parameters: Don't remove parameter from lambda.
Apr 7 2020, 2:43 PM · Restricted Project, Restricted Project
mgehre added a project to D77680: [clang-tidy] misc-unused-parameters: Don't remove parameter from lambda: Restricted Project.
Apr 7 2020, 2:43 PM · Restricted Project, Restricted Project
mgehre created D77680: [clang-tidy] misc-unused-parameters: Don't remove parameter from lambda.
Apr 7 2020, 2:43 PM · Restricted Project, Restricted Project
mgehre updated the diff for D77572: [clang-tidy] add new check readability-use-anyofallof.

Review comments

Apr 7 2020, 2:43 PM · Restricted Project, Restricted Project
mgehre updated the diff for D77572: [clang-tidy] add new check readability-use-anyofallof.

Review comments

Apr 7 2020, 2:42 PM · Restricted Project, Restricted Project
mgehre added a comment to D77572: [clang-tidy] add new check readability-use-anyofallof.

I'm struggling to see the value of this check though. If it was reworked to check for loop in the middle of a function it would have a lot more value.

Apr 7 2020, 2:42 PM · Restricted Project, Restricted Project

Apr 6 2020

mgehre updated the summary of D77572: [clang-tidy] add new check readability-use-anyofallof.
Apr 6 2020, 11:57 PM · Restricted Project, Restricted Project
mgehre created D77572: [clang-tidy] add new check readability-use-anyofallof.
Apr 6 2020, 10:51 AM · Restricted Project, Restricted Project

Jan 9 2020

mgehre added inline comments to D72380: [DataFlow] Factor two worklist implementations out.
Jan 9 2020, 12:44 PM · Restricted Project

Jan 8 2020

mgehre added inline comments to D72380: [DataFlow] Factor two worklist implementations out.
Jan 8 2020, 11:55 AM · Restricted Project

Nov 10 2019

mgehre added a comment to D70052: [clang-tidy] Add misc-mutating-copy check.

Did you consider to warn on copy constructors/assignment operators take a their arguments by non-const reference, and suggest the user to turn them into const references? This seems like a more useful (and easier) check to me.
The link above contains Ideally, the copy operator should have an idiomatic signature. For copy constructors, that is T(const T&); and for copy assignment operators, that is T& operator=(const T&);..

Nov 10 2019, 10:59 AM · Restricted Project, Restricted Project
mgehre added a comment to D70052: [clang-tidy] Add misc-mutating-copy check.

Have you run your check over the LLVM/clang source base and seen true positives/false positives?

Nov 10 2019, 8:36 AM · Restricted Project, Restricted Project

Nov 6 2019

MyDeveloperDay awarded rG24130d661ed4: [clang-tidy] Add readability-make-member-function-const a Like token.
Nov 6 2019, 12:35 AM
mgehre committed rG24130d661ed4: [clang-tidy] Add readability-make-member-function-const (authored by mgehre).
[clang-tidy] Add readability-make-member-function-const
Nov 6 2019, 12:32 AM
mgehre closed D68074: [clang-tidy] Add readability-make-member-function-const.
Nov 6 2019, 12:32 AM · Restricted Project, Restricted Project

Nov 2 2019

mgehre added a comment to D68074: [clang-tidy] Add readability-make-member-function-const.

Thanks, fixed!

Nov 2 2019, 2:54 PM · Restricted Project, Restricted Project

Oct 30 2019

mgehre added a comment to D68074: [clang-tidy] Add readability-make-member-function-const.

Friendly Ping

Oct 30 2019, 12:21 AM · Restricted Project, Restricted Project

Oct 20 2019

mgehre updated the diff for D68074: [clang-tidy] Add readability-make-member-function-const.
  • Update documentation
Oct 20 2019, 2:34 PM · Restricted Project, Restricted Project

Oct 19 2019

mgehre added inline comments to D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra.
Oct 19 2019, 4:17 AM · Restricted Project, Restricted Project
mgehre added a comment to D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra.

Exactly due to the issue you are fixing here, we ended up disabling the complete check because we didn't want to live with the warnings it produced on -Wextra.
Therefore, I'm actually strongly in favor to enable the option by default.

Oct 19 2019, 4:17 AM · Restricted Project, Restricted Project

Oct 9 2019

mgehre added inline comments to D68074: [clang-tidy] Add readability-make-member-function-const.
Oct 9 2019, 12:13 PM · Restricted Project, Restricted Project
mgehre added inline comments to D68074: [clang-tidy] Add readability-make-member-function-const.
Oct 9 2019, 12:04 PM · Restricted Project, Restricted Project

Sep 29 2019

mgehre added a comment to D68074: [clang-tidy] Add readability-make-member-function-const.

Awesome!
I believe i have asked this question in the convert-to-static diff - can ExprMutAnalyzer be used here?

I believe in this case, we can get away with a simpler analysis. Because this is an prvalue,
there are less operations that can be done to it, and it seems easy to just list those here. Also, we want
to conservatively disallow "const" access to non-public member variables/functions, and I don't see
how this would elegantly integrate with using the ExprMutationAnalyzer.

Sep 29 2019, 10:48 AM · Restricted Project, Restricted Project
mgehre updated the diff for D68074: [clang-tidy] Add readability-make-member-function-const.
  • Implement review comments
Sep 29 2019, 10:36 AM · Restricted Project, Restricted Project

Sep 26 2019

mgehre created D68074: [clang-tidy] Add readability-make-member-function-const.
Sep 26 2019, 12:55 AM · Restricted Project, Restricted Project

Sep 6 2019

mgehre committed rG4934f013b12b: [LifetimeAnalysis] don't use raw string literals in macros (authored by mgehre).
[LifetimeAnalysis] don't use raw string literals in macros
Sep 6 2019, 12:15 PM
mgehre committed rL371241: [LifetimeAnalysis] don't use raw string literals in macros.
[LifetimeAnalysis] don't use raw string literals in macros
Sep 6 2019, 12:15 PM
mgehre committed rGf64f4886706b: Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration… (authored by mgehre).
Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration…
Sep 6 2019, 1:57 AM
mgehre committed rL371182: Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration….
Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration…
Sep 6 2019, 1:55 AM

Sep 5 2019

mgehre abandoned D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods.

The discussions on the bug did not provide further insight (until now).

Sep 5 2019, 2:34 PM · Restricted Project, Restricted Project

Aug 27 2019

mgehre added a comment to D66806: [LifetimeAnalysis] Fix some false positives.

Nice! Having no false-positives is most important because this is enabled by default.

Aug 27 2019, 12:32 PM · Restricted Project, Restricted Project

Aug 26 2019

mgehre added a comment to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

I'm seeing the same issue Not all CodeGen sections are inside any Frontend section! with python 3.7.1. Json:

Aug 26 2019, 2:09 PM · Restricted Project, Restricted Project

Aug 24 2019

mgehre added inline comments to D66686: [LifetimeAnalysis] Make it possible to disable the new warnings.
Aug 24 2019, 12:56 AM · Restricted Project, Restricted Project

Aug 23 2019

mgehre added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

Yes, it means that the automatic inference of Pointer/Owner from base classes has the same issues as all of those automatic inferences: Once can construct a case where they are not true.
So for having no false-positives at all, we should avoid this inference by default and not consider MutableArrayRef to be a gsl::Pointer.
Instead, we disable the analysis when it sees an unannotated class (like here, MutableArrayRef).

Aug 23 2019, 1:13 PM · Restricted Project
mgehre added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

When I understand you correctly, you are thinking about
the cases

OwningArrayRef getRef();
Aug 23 2019, 12:38 PM · Restricted Project
mgehre added a comment to D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.

Generally, ArrayRef is also a candidate. But there we have the complication that OwningArrayRef indirectly inherits from ArrayRef. One is a gsl::Owner, the other a gsl::Pointer, and we
need to make sure that we handle it correctly when OwningArrayRef is accessed through its base class which is then seen as a Pointer.
I would thus defer this part to a later PR.

Aug 23 2019, 12:01 PM · Restricted Project
mgehre added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

Also it feels a bit weird to change the ownership semantics in a derived class, I bet that would violate the Liskov substitution principle.

And then we see that llvm::OwningArrayRef inherits from llvm::ArrayRef ... But maybe this direction (strengthening a Pointer into an Owner)
is okay. We'll need to go though the call rules, and see if something breaks when the caller passes an Owner to a function that takes a base class (i.e. Pointer).
My initial reaction is that this should work in general. An Owner is like a Pointer that points to {static}.

Aug 23 2019, 11:55 AM · Restricted Project

Aug 22 2019

mgehre added a comment to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).

Yes, for libc++ we could add the annotations to its source code, and eventually this would be the cleaner solution.
Currently, that is neither sufficient (because one could use libstdc++, MSVC or an older libc++ version) nor necessary (the inference we need for libstdc++ / MSVC also works for libc++),
so it's currently low on our priority list.

Aug 22 2019, 1:22 PM · Restricted Project, Restricted Project
mgehre added inline comments to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
Aug 22 2019, 1:17 PM · Restricted Project, Restricted Project

Aug 21 2019

mgehre added inline comments to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
Aug 21 2019, 3:58 PM · Restricted Project, Restricted Project
mgehre added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

In the false-positive example, after the DerivedToBase, we see a constructor call which I think is the copy constructor.

  1. We should consider MutableArrayRef to be a gsl::Pointer according to the paper, because it publicly derives from one.
  2. Also in the paper, the copy constructor does should copies the pset of the argument instead of making the pointer point at the argument.

What do you think?

Aug 21 2019, 3:25 PM · Restricted Project
mgehre committed rGb1c78012900b: [LifetimeAnalysis] Support more STL idioms (template forward declaration and… (authored by mgehre).
[LifetimeAnalysis] Support more STL idioms (template forward declaration and…
Aug 21 2019, 3:14 PM
mgehre committed rL369591: [LifetimeAnalysis] Support more STL idioms (template forward declaration and….
[LifetimeAnalysis] Support more STL idioms (template forward declaration and…
Aug 21 2019, 3:11 PM
mgehre closed D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
Aug 21 2019, 3:10 PM · Restricted Project, Restricted Project
mgehre added inline comments to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
Aug 21 2019, 3:07 PM · Restricted Project, Restricted Project

Aug 20 2019

mgehre added a comment to D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes.

This change might be the cause for the false-positive in https://github.com/mgehre/llvm-project/issues/45. Could you check?

Aug 20 2019, 2:21 PM · Restricted Project
mgehre added a comment to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).

I now add the attributes to all redeclarations to make the logic a bit easier to follow.

Aug 20 2019, 2:11 PM · Restricted Project, Restricted Project
mgehre updated the diff for D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).
  • Put OwnerAttr/PointerAttr on all redeclarations
  • clang/lib/Sema/SemaAttr.cpp: Use Attribute::CreateImplicit as requested in review
Aug 20 2019, 2:11 PM · Restricted Project, Restricted Project

Aug 19 2019

mgehre committed rG5b3275e56f3c: [ORC] fix use-after-free detected by -Wreturn-stack-address (authored by mgehre).
[ORC] fix use-after-free detected by -Wreturn-stack-address
Aug 19 2019, 3:05 PM
mgehre committed rL369306: [ORC] fix use-after-free detected by -Wreturn-stack-address.
[ORC] fix use-after-free detected by -Wreturn-stack-address
Aug 19 2019, 2:58 PM
mgehre closed D66440: [ORC] fix use-after-free detected by -Wreturn-stack-address.
Aug 19 2019, 2:58 PM · Restricted Project
mgehre committed rG8b0d15e43f33: Fix use-after-free (authored by mgehre).
Fix use-after-free
Aug 19 2019, 2:40 PM
mgehre updated the summary of D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.
Aug 19 2019, 2:39 PM · Restricted Project
mgehre committed rL369304: Fix use-after-free.
Fix use-after-free
Aug 19 2019, 2:38 PM
mgehre closed D66442: Fix use-after-free.
Aug 19 2019, 2:38 PM · Restricted Project, Restricted Project
mgehre updated subscribers of D66440: [ORC] fix use-after-free detected by -Wreturn-stack-address.
Aug 19 2019, 2:37 PM · Restricted Project
mgehre updated subscribers of D66442: Fix use-after-free.
Aug 19 2019, 2:36 PM · Restricted Project, Restricted Project
mgehre created D66443: [LifetimeAnalysis] Add [[gsl::Pointer]] to llvm::StringRef.
Aug 19 2019, 2:36 PM · Restricted Project
mgehre created D66442: Fix use-after-free.
Aug 19 2019, 2:23 PM · Restricted Project, Restricted Project
mgehre created D66440: [ORC] fix use-after-free detected by -Wreturn-stack-address.
Aug 19 2019, 2:13 PM · Restricted Project
mgehre added a comment to D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods.

I struggle myself to fully understand the motivation behind the bug report. This is certainly not code that I would write.
So I don't really care about that kind of code and I didn't want to be in the way of other people's way of writing C++.

Aug 19 2019, 12:25 PM · Restricted Project, Restricted Project

Aug 16 2019

mgehre added a comment to D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType).

I now start to wonder if we should instead put the attribute on all declarations (instead of just the canonical). Later redeclarations automatically inherit the attributes.
This would make both the checking easier (just check any declaration, no need to obtain the canonical first), and remove the special
case for adding to the definition of templated record for ClassTemplateDecls.

Aug 16 2019, 1:39 PM · Restricted Project, Restricted Project
mgehre created D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods.
Aug 16 2019, 1:32 PM · Restricted Project, Restricted Project

Aug 15 2019

mgehre added inline comments to D66303: [LifetimeAnalysis] Add support for free functions.
Aug 15 2019, 1:47 PM · Restricted Project, Restricted Project