[PATCH] D77979: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName

2020-04-12 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added reviewers: aaron.ballman, alexfh, hokein, njames93. Herald added a subscriber: xazax.hun. Herald added a project: clang. Before this PR, `modernize-use-using` would transform the typedef in template struct InjectedClassName { typedef InjectedCla

[PATCH] D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword

2020-04-14 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added reviewers: aaron.ballman, alexfh, hokein, njames93. Herald added a subscriber: xazax.hun. Herald added a project: clang. Before this PR, `modernize-use-using` would transform the typedef in template class TemplateKeyword { typedef typename a::temp

[PATCH] D77572: [clang-tidy] add new check readability-use-anyofallof

2020-04-14 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. 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? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77572/new/ https://reviews.llvm

[PATCH] D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword

2020-04-15 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 257774. mgehre marked an inline comment as done. mgehre added a comment. Implement review comments (Thanks!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78139/new/ https://reviews.llvm.org/D78139 Files: cla

[PATCH] D77572: [clang-tidy] add new check readability-use-anyofallof

2020-06-03 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Sorry for breaking the build and thanks for the fixes! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77572/new/ https://reviews.llvm.org/D77572 ___ cfe-commits mailing list cfe-

[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

2020-04-17 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: test/clang-tidy/bugprone-map-subscript-operator-lookup.cpp:60 +} + +void noWarning() { We often have code like ``` auto &V = Map[Idx]; if (!V) { V = init(); } use(V); ``` Would that be flagged by this check? Could you a

[PATCH] D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword

2020-04-17 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0642e5e7a7e5: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword (authored by mgehre). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D77979: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName

2020-04-27 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG145dcef8bdf9: [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D77979?vs=256872&id=260294#toc Repository

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2020-04-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. 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; using B = int; when applying fixits with `clang-

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2020-05-04 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Could be - did it handle it correctly for your include case here? And if this is a general yaml string thing, shouldn't the replacement of newlines (for both ways) happen in the yaml parser/writer instead of clang/Tooling? Repository: rL LLVM CHANGES SINCE LAST ACTI

[PATCH] D77572: [clang-tidy] add new check readability-use-anyofallof

2020-05-14 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Ping :-) I'm looking for directions on what the next steps are. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77572/new/ https://reviews.llvm.org/D77572 ___ cfe-commits mailing

[PATCH] D127287: clang: Introduce -fexperimental-max-bitint-width

2022-07-06 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd closed this revision. mgehre-amd added a comment. Merged Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127287/new/ https://reviews.llvm.org/D127287 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-28 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd marked 2 inline comments as done. mgehre-amd added inline comments. Herald added a subscriber: MaskRay. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more tha

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-29 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd updated this revision to Diff 418861. mgehre-amd added a comment. Herald added a subscriber: dexonsmith. - Remove diagnostics for float-to-bitint - Remove lexer changes (will be another PR) - Add -fexperimental-max-bitint-width=N Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-29 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:315 #define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) -#define BENIGN_VALUE_LANGOPT(Name, Type, Bits, Default, Description) +#define BENIGN_VALUE_LANGOPT(Name, Bits, Default, De

[PATCH] D122075: [clang-tidy] Skip parentheses in `readability-make-member-function-const`

2022-03-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122075/new/ https://reviews.llvm.org/D122075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D122227: Fix _BitInt suffix width calculation

2022-03-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd accepted this revision. mgehre-amd added a comment. Thanks a lot! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17/new/ https://reviews.llvm.org/D17 ___ cfe-commits mailing list cfe-co

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd created this revision. mgehre-amd added reviewers: aaron.ballman, erichkeane. Herald added subscribers: luke957, s.egerton, mstorsjo, simoncook, fedor.sergeev, dschuff. Herald added a project: All. mgehre-amd requested review of this revision. Herald added subscribers: pcwang-thead, ahe

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd marked an inline comment as done. mgehre-amd added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; -

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd marked 3 inline comments as done. mgehre-amd added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; -

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt

2022-07-19 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd abandoned this revision. mgehre-amd added a comment. Instead of linking to libbitint, I instead created a backend pass to transform div/rem instructions: https://reviews.llvm.org/D130076 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1222

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-20 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. I now add the attributes to all redeclarations to make the logic a bit easier to follow. Comment at: clang/lib/Sema/SemaAttr.cpp:94 - Canonical->addAttr(::new (Context) Attribute(SourceRange{}, Context, -

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-20 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 216247. mgehre marked 6 inline comments as done. mgehre added a comment. Herald added a subscriber: mgorny. - Put OwnerAttr/PointerAttr on all redeclarations - clang/lib/Sema/SemaAttr.cpp: Use Attribute::CreateImplicit as requested in review Repository: rG

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-20 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. This change might be the cause for the false-positive in https://github.com/mgehre/llvm-project/issues/45. Could you check? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66486/new/ https://reviews.llvm.org/D66486 ___

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 3 inline comments as done. mgehre added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4596 +for (Decl *Redecl : D->redecls()) { + Redecl->addAttr(::new (S.Context) + OwnerAttr(AL.getRange(), S.Context, DerefTypeLoc, -

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-21 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mgehre marked an inline comment as done. Closed by commit rL369591: [LifetimeAnalysis] Support more STL idioms (template forward declaration and… (authored by mgehre, committed by ). Herald added a project: LLVM. Herald adde

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. 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

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked an inline comment as done. mgehre added inline comments. Comment at: cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp:9 + +#include "../ASTMatchers/ASTMatchersTest.h" +#include "clang/ASTMatchers/ASTMatchers.h" thakis wrote: > This weird relati

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 2 inline comments as done. mgehre added inline comments. Comment at: cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp:9 + +#include "../ASTMatchers/ASTMatchersTest.h" +#include "clang/ASTMatchers/ASTMatchers.h" thakis wrote: > mgehre wrote: > >

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked an inline comment as done. mgehre added a comment. 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 neces

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. > 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 in

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. When I understand you correctly, you are thinking about the cases OwningArrayRef getRef(); ArrayRef f() { ArrayRef r = getRef(); // warning: r points into temporary owner return r; } and ArrayRef getRef() { OwningArrayRef r; return r; // warni

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. 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 a

[PATCH] D66686: [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-24 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6651 visitLocalsRetainedByReferenceBinding(Path, Arg, RK_ReferenceBinding, -Visit); +Visit, true); else --

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-08-26 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. I'm seeing the same issue `Not all CodeGen sections are inside any Frontend section!` with python 3.7.1. Json: F9863382: check-time-trace-sections.json Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63325

[PATCH] D66806: [LifetimeAnalysis] Fix some false positives

2019-08-27 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Nice! Having no false-positives is most important because this is enabled by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66806/new/ https://reviews.llvm.org/D66806 _

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

2019-09-05 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre abandoned this revision. mgehre added a comment. The discussions on the bug did not provide further insight (until now). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66365/new/ https://reviews.llvm.org/D66365

[PATCH] D72380: [DataFlow] Factor two worklist implementations out

2020-01-08 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h:20 +namespace clang { +template class DataflowWorklistBase { + llvm::BitVector EnqueuedBlocks; Should this class have a bit of doxygen and a unit test? CHA

[PATCH] D72380: [DataFlow] Factor two worklist implementations out

2020-01-09 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h:20 +namespace clang { +template class DataflowWorklistBase { + llvm::BitVector EnqueuedBlocks; xazax.hun wrote: > xazax.hun wrote: > > mgehre wrote: > > > Sh

[PATCH] D24888: [clang-tidy] Use [[clang::suppress]] with cppcoreguidelines-pro-type-reinterpret-cast

2023-01-16 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. In D24888#4025382 , @bam wrote: > I'm sorry, could we bring it to the finish line? > It's a pity the standard C++ Core Guidelines rule suppression syntax is still > not supported, as Clang-tidy is one of the main tools supporting t

[PATCH] D127287: clang: Introduce -fexperimental-max-bitint-width

2022-06-08 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd created this revision. mgehre-amd added a reviewer: aaron.ballman. Herald added a project: All. mgehre-amd requested review of this revision. Herald added a project: clang. This splits of the introduction of -fexperimental-max-bitint-width from https://reviews.llvm.org/D122234 because

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt

2022-06-08 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd marked an inline comment as done. mgehre-amd added a comment. I split the introduction of -fexperimental-max-bitint-width into https://reviews.llvm.org/D127287 because there is still discussion about the bitint libraries in the backend PRs. Repository: rG LLVM Github Monorepo CHA

[PATCH] D127287: clang: Introduce -fexperimental-max-bitint-width

2022-06-08 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd updated this revision to Diff 435161. mgehre-amd marked 4 inline comments as done. mgehre-amd added a comment. Used Optional Added entry to release notes Modifed help text according to suggestion Added comment to LANGOPT that it will be removed in the future Repository: rG LLVM Gith

[PATCH] D127287: clang: Introduce -fexperimental-max-bitint-width

2022-06-08 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added a comment. Thanks for the quick review! Comment at: clang/test/Sema/large-bit-int.c:1 +// RUN: %clang_cc1 -fexperimental-max-bitint-width=1024 -fsyntax-only -verify %s -Wno-unused -triple x86_64-gnu-linux + aaron.ballman wrote: > Thoughts on a

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-01 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added a comment. Do other targets not support > 128 bit integers, or is this PR only the first conservative step of lifting the limit? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139170/new/ https://reviews.llvm.org/D139170 _

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre-amd added a comment. In D139170#3965850 , @FreddyYe wrote: > In D139170#3965814 , @mgehre-amd > wrote: > >> Do other targets not support > 128 bit integers, or is this PR only the >> first conservative st

[PATCH] D68074: [clang-tidy] Add readability-make-member-function-const

2019-10-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Friendly Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68074/new/ https://reviews.llvm.org/D68074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D68074: [clang-tidy] Add readability-make-member-function-const

2019-11-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 8 inline comments as done. mgehre added a comment. Thanks, fixed! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68074/new/ https://reviews.llvm.org/D68074 ___ cfe-commits mailing list cfe

[PATCH] D68074: [clang-tidy] Add readability-make-member-function-const

2019-11-06 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24130d661ed4: [clang-tidy] Add readability-make-member-function-const (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D68074?vs=225804&id=228006#toc Repository: rG LLVM Github

[PATCH] D70052: [clang-tidy] Add misc-mutating-copy check

2019-11-11 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Have you run your check over the LLVM/clang source base and seen true positives/false positives? Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-mutating-copy.rst:6 + +Finds assignments to and to direct or indirect members of the copied object

[PATCH] D70052: [clang-tidy] Add misc-mutating-copy check

2019-11-11 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. 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

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-01-06 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Hi, this is a good idea for a check. I would prefer when the FixIt just removes throw(A,B) specifier, instead of replacing it by noexcept(false), because noexcept(false) means the same things as having no noexcept specifier at all. And less code to read means its easier

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-01-06 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. I'm working on code bases where their is no manually written noexcept(false) anywhere, and I don't think the FixIt should look different than manually written code. At least a configuration option for the check would be nice. https://reviews.llvm.org/D20693 __

[PATCH] D30848: Implement DR 373 "Lookup on namespace qualified name in using-directive"

2017-03-15 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 91956. mgehre added a comment. Improve diagnostics and add tests for them. https://reviews.llvm.org/D30848 Files: include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/SemaCXXScopeSpec

[PATCH] D30848: Implement DR 373 "Lookup on namespace qualified name in using-directive"

2017-03-17 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298126: Implement DR 373 "Lookup on namespace qualified name in using-directive" (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D30848?vs=91956&id=92209#toc Repository: rL LL

[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2017-03-17 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 92211. mgehre marked an inline comment as done. mgehre added a comment. Update for review comments https://reviews.llvm.org/D24886 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaStmtAttr.cpp

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. Herald added a subscriber: mgorny. Flags (and replaces) the alternative tokens for binary and unary operators, such as ``not`` (for ``!``), ``bitand`` (for ``&``), ``or`` (for ``||``) or ``not_eq`` (for ``!=``). https://reviews.llvm.org/D31308 Files: clang-tidy/

[PATCH] D22476: [AST] Make MemberExpr non-dependent according to core issue 224

2017-03-24 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Friendly ping https://reviews.llvm.org/D22476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-24 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Thanks for your feedback, Eugene! I'm not sure if it would be helpful to have this check in both ways. I did a code search for "not_eq", "bitand" and "and_eq" on github, and their usage seems to be a clear minority. So I would propose to keep the features as-is for now,

[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2017-03-24 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 92923. mgehre added a comment. Thank you for the comments; all of them have been addressed. https://reviews.llvm.org/D24886 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaStmtAttr.cpp test/

[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2017-03-25 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93055. mgehre added a comment. Added test to misc; minor wording https://reviews.llvm.org/D24886 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaStmtAttr.cpp test/Misc/ast-dump-attr.cpp te

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2017-03-25 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93056. mgehre marked 2 inline comments as done. mgehre added a comment. Add suffix for floating point literals; clang-format https://reviews.llvm.org/D24892 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTy

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2017-03-25 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:377 +else if (type->isIntegerType()) + Initializer = " = 0"; +else if (type->isFloatingType()) aaron.ballman wrote: > What about cases where

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-25 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93057. mgehre added a comment. Rename check to readability-operators-representation https://reviews.llvm.org/D31308 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OperatorsRepresentationCheck.cpp clang-tidy/readability/OperatorsRep

[PATCH] D18914: [clang-tidy] new readability-redundant-inline

2017-03-25 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Friendly ping https://reviews.llvm.org/D18914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31370: [clang-tidy] Prototype to check for exception specification

2017-03-25 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang-tidy/modernize/NoexceptCorrectnessCheck.cpp:60 + N.getNodeAs("direct_throwing_decl")) { +// FIXME how is that done? i did not find a noThrow predicate +//if (ThrowingDecl->isNoThrow()) { JonasToth w

[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2017-03-27 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298880: Add [[clang::suppress(rule, ...)]] attribute (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D24886?vs=93055&id=93168#toc Repository: rL LLVM https://reviews.llvm.org

[PATCH] D31130: B32239 clang-tidy should not warn about array to pointer decay on system macros

2017-03-27 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp:83 + unless(hasSourceExpression(stringLiteral())), + unless(sysSymbolDecayInSysHeader())) .bind("cast"), --

[PATCH] D31441: [clang-format] fix crash in NamespaceEndCommentsFixer (PR32438)

2017-03-28 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. Herald added a subscriber: klimek. The new test case was crashing before. Now it passes as expected. https://reviews.llvm.org/D31441 Files: lib/Format/NamespaceEndCommentsFixer.cpp unittests/Format/NamespaceEndCommentsFixerTest.cpp Index: unittests/Format/Nam

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-28 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93309. mgehre added a comment. Improved diagnostic; updated documentation; added test for overloaded operator https://reviews.llvm.org/D31308 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OperatorsRepresentationCheck.cpp clang-tid

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-28 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang-tidy/readability/OperatorsRepresentationCheck.cpp:34 + + if (const auto *B = Result.Nodes.getNodeAs("binary")) { +switch (B->getOpcode()) { aaron.ballman wrote: > alexfh wrote: > > aaron.ballman wrote: > > > I

[PATCH] D31441: [clang-format] fix crash in NamespaceEndCommentsFixer (PR32438)

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93507. mgehre added a comment. Updated for comments https://reviews.llvm.org/D31441 Files: lib/Format/NamespaceEndCommentsFixer.cpp unittests/Format/NamespaceEndCommentsFixerTest.cpp Index: unittests/Format/NamespaceEndCommentsFixerTest.cpp ===

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93511. mgehre added a comment. Put 'u' and 'l' on integer literals https://reviews.llvm.org/D24892 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h docs/ReleaseNotes.rst docs/clang-t

[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked an inline comment as done. mgehre added a comment. Friendly ping https://reviews.llvm.org/D15031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93519. mgehre added a comment. only check C++ code; only match operators that can have alternative representations https://reviews.llvm.org/D31308 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OperatorsRepresentationCheck.cpp cla

[PATCH] D31441: [clang-format] fix crash in NamespaceEndCommentsFixer (PR32438)

2017-04-04 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299465: [clang-format] fix crash in NamespaceEndCommentsFixer (PR32438) (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D31441?vs=93507&id=94108#toc Repository: rL LLVM https

[PATCH] D31887: [clangd] Add documentation page

2017-04-12 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: docs/clangd.rst:28 + +You can follow the instructions for `building Clang `_ but "extra Clang Tool" is **not** optional. + In the reference, it is called "extra Clang tools". h

[PATCH] D22587: [ASTContext] Fix part of DR224 for nontype template arguments

2017-01-24 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Ping https://reviews.llvm.org/D22587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2017-07-12 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307759: CFG: Add CFGElement for automatic variables that leave the scope (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D15031?vs=91378&id=106146#toc Repository: rL LLVM htt

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2017-07-20 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 107632. mgehre marked 3 inline comments as done. mgehre added a comment. Herald added subscribers: kbarton, xazax.hun, JDevlieghere. Implemented all review comments Use global settings "UseAssignment" https://reviews.llvm.org/D24892 Files: clang-tidy/cppco

[PATCH] D22476: [AST] Make MemberExpr non-dependent according to core issue 224

2017-03-04 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 90591. mgehre marked 4 inline comments as done. mgehre added a comment. Thanks for your comments! I'm very sorry for the huge delay. I have now more time to work on this. I added all your comments to the commit and fixed a crash in SemaChecking::RefersToMember

[PATCH] D22476: [AST] Make MemberExpr non-dependent according to core issue 224

2017-03-04 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: lib/AST/Expr.cpp:1413 +for (auto *EnableIf : Method->specific_attrs()) { + if (EnableIf->getCond()->isTypeDependent()) +return false; rsmith wrote: > You should presumably be checking `isValueDependent` h

[PATCH] D22476: [AST] Make MemberExpr non-dependent according to core issue 224

2017-03-04 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 90592. mgehre added a comment. Updated fix for the crash in SemaChecking::RefersToMemberWithReducedAlignment, so it also works for C code. https://reviews.llvm.org/D22476 Files: lib/AST/Expr.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaOverload.cpp tes

[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2017-03-10 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 91378. mgehre marked an inline comment as done. mgehre added a comment. Handle back-patches gotos and add test case Turned LocalScope::const_iterator::shared_parent from O(N^2) into O(N) time The combination with AddImplicitDtors will be added in a separate pat

[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2017-03-10 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. I'm sorry for the long delay! Regarding " I think it would also be good to (eventually) add CFGElements marking when the storage duration for underlying storage ends.": From what I understand, this only differs from the end of lifetime in case of objects with non-trivial

[PATCH] D30848: Implement DR 373 "Lookup on namespace qualified name in using-directive"

2017-03-10 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. 3.4.6 [basic.lookup.udir] paragraph 1: In a using-directive or namespace-alias-definition, during the lookup for a namespace-name or for a name in a nested-name-specifier, only namespace names are considered. https://reviews.llvm.org/D30848 Files: include/clang

[PATCH] D30848: Implement DR 373 "Lookup on namespace qualified name in using-directive"

2017-03-10 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 91418. mgehre added a comment. clang-format https://reviews.llvm.org/D30848 Files: include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/SemaCXXScopeSpec.cpp test/CXX/drs/dr3xx.cpp

[PATCH] D30848: Implement DR 373 "Lookup on namespace qualified name in using-directive"

2017-03-10 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 91424. mgehre added a comment. Added clang version to test and regenerated cxx_dr_status.html https://reviews.llvm.org/D30848 Files: include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExprCXX.cpp lib/Se

<    1   2