[PATCH] D115740: [clang][dataflow] Add simplistic constant-propagation analysis.

2021-12-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 10 inline comments as done. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp:97 + +} // namespace + sgatev wrote: > Why not put the definitions below also in the anonymous names

[PATCH] D115740: [clang][dataflow] Add simplistic constant-propagation analysis.

2021-12-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 394617. ymandel marked 5 inline comments as done. ymandel added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115740/new/ https://reviews.llvm.org/D115740 Files: clang/unit

[PATCH] D115740: [clang][dataflow] Add simplistic constant-propagation analysis.

2021-12-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8179e1fd519d: [clang][dataflow] Add simplistic constant-propagation analysis. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: rnkovacs, mgorny. ymandel requested review of this revision. Herald added a project: clang. This patchs adds a `MapLattice` template for lifting a lattice to a keyed map. A typical use

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: rnkovacs, mgorny. ymandel requested review of this revision. Herald added a project: clang. Adds another constant-propagation analysis that covers all variables in the scope (vs the exi

[PATCH] D116368: [clang][dataflow] Add transfer function for VarDecl statements

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Nice! A few small comments on the headers... Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:56 + + /// Assigns `Loc` to `D`. + /// The term "assignment" is overloaded. :) Maybe instead "Associates `

[PATCH] D116377: [libTooling] Adds more support for constructing object access expressions.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr2. ymandel requested review of this revision. Herald added a project: clang. This patch adds a `buildAccess` function, which constructs a string with the proper operator to use based on the expression's form and type. It also adds t

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 396557. ymandel marked an inline comment as done. ymandel added a comment. Fix handling of uninitialized variables. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116370/new/ https://reviews.llvm.org/D116370 Fi

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:375-376 + Pair("p2", HoldsCPLattice(UnorderedElementsAre( + Pair(Var("target"), HasConstantVal(2)), +

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 396565. ymandel added a comment. addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116369/new/ https://reviews.llvm.org/D116369 Files: clang/include/clang/Analysis/FlowSensitive/MapLattice.h

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 396570. ymandel marked 2 inline comments as done. ymandel added a comment. update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116369/new/ https://reviews.llvm.org/D116369 Files: clang/include/clan

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. In D116369#3212532 , @sgatev wrote: > It seems unnecessary to deal with AST elements in the tests for `MapLattice`. > I think testing it with integer or string keys would be simpler. Give

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2021-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D116370#3213120 , @xazax.hun wrote: > Does it make sense to have both the single and multi variable tracking tests? > Or do we want to have these as some sort of steps in a tutorial? Right -- the intent in keeping the origina

[PATCH] D116369: [clang][dataflow] Add parameterized map lattice.

2021-12-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/MapLattice.h:92 + /// entry as it was in the source map. + LatticeJoinEffect join(const MapLattice &Other) { +LatticeJoinEffect Effect = LatticeJo

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. (but please wait for "accept" from an owner). Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return ll

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} flx wrote: > ymandel wrote: > > nit: while

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} flx wrote: > ymandel wrote: > > flx wrote:

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:60 + return RegexAndScope{ + .Regex = llvm::Regex(Name), + .MatchQualifiedName = Name.contains("::"), I do

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. But please wait for additional "Accept" from either `hokein` or `aaron.ballman`. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/n

[PATCH] D100450: [libTooling] Add smart pointer support to the `access` Stencil

2021-04-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang/unittests/Tooling/StencilTest.cpp:410 + StringRef Id = "id"; + testExpr(Id, Snippet, access(Id, "field"), "(*x).field"); +} Hmm

[PATCH] D93637: [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s.

2021-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 314615. ymandel added a comment. added comment known smart pointers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93637/new/ https://reviews.llvm.org/D93637 Files: clang/include/clang/Tooling/Transformer/St

[PATCH] D93637: [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s.

2021-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Thanks for the review! Comment at: clang/unittests/Tooling/StencilTest.cpp:273 + std::string Snippet = R"cc( +Smart x; +x; tdl-g wrote: > You're only testing the "QuacksLike" case. I s

[PATCH] D93695: [clang-tidy] Update uses of deprecated Transformer APIs in StringFindStrContainsCheck.

2021-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9eb2284f6039: [clang-tidy] Update uses of deprecated Transformer APIs in… (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93695/new/ ht

[PATCH] D93637: [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s.

2021-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 314642. ymandel marked an inline comment as done. ymandel added a comment. Added test for unique_ptr specifically. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93637/new/ https://reviews.llvm.org/D93637 Files

[PATCH] D93637: [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s.

2021-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D93637#2479576 , @tdl-g wrote: > Ah, if it's just an optimization that makes sense. I still think it's worth > having a test case to confirm that one of the specially-handled cases works. Sure. I added one for unique pointer.

[PATCH] D93637: [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s.

2021-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG675a2973ee77: [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s. (authored by ymandel). Repository: rG LLVM Github Mo

[PATCH] D93703: [libTooling] Change `addInclude` to use expansion locs.

2021-01-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Gentle ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93703/new/ https://reviews.llvm.org/D93703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D94453: [libTooling] Add function to Transformer for creating a diagnostic-only rule.

2021-01-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: tdl-g. ymandel requested review of this revision. Herald added a project: clang. Adds a convenience function for creating a rule that only generates a diagnostic, without any correpsonding edits. Repository: rG LLVM Github Monorepo http

[PATCH] D94453: [libTooling] Add function to Transformer for creating a diagnostic-only rule.

2021-01-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 316158. ymandel added a comment. Discarded API changes, reduced to new clang-tidy lib test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94453/new/ https://reviews.llvm.org/D94453 Files: clang-tools-extra/u

[PATCH] D94453: [clang-tidy][NFC] Add test for Transformer-based checks with diagnostics.

2021-01-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Reworked, per our discussion. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94453/new/ https://reviews.llvm.org/D94453 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D94453: [clang-tidy][NFC] Add test for Transformer-based checks with diagnostics.

2021-01-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG922a5b894114: [clang-tidy] Add test for Transformer-based checks with diagnostics. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94453

[PATCH] D93703: [libTooling] Change `addInclude` to use expansion locs.

2021-01-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1fabe6e51917: [libTooling] Change `addInclude` to use expansion locs. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D111242: Add `TypeLoc`-related matchers.

2021-10-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Nice! Just some minor notes. Comment at: clang/docs/LibASTMatchersReference.html:636 -MatcherDecl>blockDeclMatcherBlockDecl>... +M

[PATCH] D111242: Add `TypeLoc`-related matchers.

2021-10-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Also, please list the new matchers in the patch description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111242/new/ https://reviews.llvm.org/D111242 ___ cfe-commits mailing li

[PATCH] D111242: Add `TypeLoc`-related matchers.

2021-10-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6400 +/// pointerTypeLoc(hasPointeeLoc(loc(asString("int" +/// matches `int*`. +AST_MATCHER_P(PointerTyp

[PATCH] D111242: Add `TypeLoc`-related matchers.

2021-10-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/docs/LibASTMatchersReference.html:636 -MatcherDecl>blockDeclMatcherBlockDecl>... +Matcher

[PATCH] D111332: [AST Matchers] Update dump_ast_matchers.py to query only class index page.

2021-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Aaron -- I'm not the right reviewer for this. I've put you as the reviewer, but feel free to re-route if there's someone better. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111332/new/ https://reviews.llvm.org/D

[PATCH] D111242: Add `TypeLoc`-related matchers.

2021-10-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGac7429656286: Add `TypeLoc`-related matchers. (authored by jcking1034, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D111332: [AST Matchers] Update dump_ast_matchers.py to query only class index page.

2021-10-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ab238af4fa4: [AST Matchers] Update dump_ast_matchers.py to query only class index page. (authored by jcking1034, committed by ymandel). Changed prior to commit: https://reviews.llvm.org/D111332?vs=3782

[PATCH] D111518: Add release note about `TypeLoc` matchers.

2021-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG25fabc434ad5: Add release note about `TypeLoc` matchers. (authored by jcking1034, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111518

[PATCH] D111708: [libTooling] Add "switch"-like Stencil combinator

2021-10-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: tdl-g. ymandel requested review of this revision. Herald added a project: clang. Adds `selectBound`, a `Stencil` combinator that allows the user to supply multiple alternative cases, discriminated by bound node IDs. Repository: rG LLVM

[PATCH] D111708: [libTooling] Add "switch"-like Stencil combinator

2021-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb6c218d4fdb7: [libTooling] Add "switch"-like Stencil combinator (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D109470: Add "profiling" to the list of absl libraries.

2021-09-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Any idea if there's a test for this matcher that should be updated? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109470/new/ https://reviews.

[PATCH] D109470: Add "profiling" to the list of absl libraries.

2021-09-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D109470#2992161 , @nilayvaish wrote: > In D109470#2992119 , @ymandel wrote: > >> Any idea if there's a test for this matcher that should be updated? > > I looked at the commit that mos

[PATCH] D109470: Add "profiling" to the list of absl libraries.

2021-09-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D109470#2992275 , @nilayvaish wrote: > ymandel@, I do not have commit access to the repo. Can you commit this for > me? Thanks! Sure! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D109470: Add "profiling" to the list of absl libraries.

2021-09-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe976fc61ecd9: Add "profiling" to the list of absl libraries. (authored by nilayvaish, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10

<    10   11   12   13   14   15