[PATCH] D135397: [clang][dataflow] Add support for a Top value in boolean formulas.

2022-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 467822. ymandel marked an inline comment as done. ymandel added a comment. rebase onto a recent HEAD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135397/new/ https://reviews.llvm.org/D135397 Files: clang/in

[PATCH] D135397: [clang][dataflow] Add support for a Top value in boolean formulas.

2022-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 rG39b9d4f188ca: [clang][dataflow] Add support for a Top value in boolean formulas. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D135923: [clang][dataflow][NFC] Mark test analysis classes as `final`.

2022-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 rG13cd184ef7fa: [clang-dataflow][NFC] Mark test analysis classes as `final`. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D135964: [clang][dataflow] Add equivalence relation for `Value` type.

2022-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 467856. ymandel added a comment. switched to function, instead of operator. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135964/new/ https://reviews.llvm.org/D135964 Files: clang/include/clang/Analysis/Flow

[PATCH] D135964: [clang][dataflow] Add equivalence relation for `Value` type.

2022-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. In D135964#3858783 , @xazax.hun wrote: > In D135964#3858706 , @ymandel wrote: > >> Reviewers: I'm inclined towards a method vs overloaded operator

[PATCH] D135978: [clang][dataflow][NFC] Fix reachability warning.

2022-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr2. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Some compilers can't determine that all cases of t

[PATCH] D135978: [clang][dataflow][NFC] Fix reachability warning.

2022-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D135978#3859272 , @xazax.hun wrote: > I'd argue the warning is correct as you could store "non-enum" integer values > into an enum typed variable (and people do that fairly often with bitwise > enums). Good point. Feels wron

[PATCH] D135978: [clang][dataflow][NFC] Fix reachability warning.

2022-10-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7da087974f94: [clang][dataflow][NFC] Fix reachability warning. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135978/new/ https://revi

[PATCH] D140306: [clang][dataflow] Remove stray lines from `Environment::join`

2022-12-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr2. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Removes an assertion and a useless line. The asser

[PATCH] D140306: [clang][dataflow] Remove stray lines from `Environment::join`

2022-12-19 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 rGa18cf8d14f55: [clang][dataflow] Remove stray lines from `Environment::join` (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D140308: [clang][dataflow][NFC] Fix comments related to widening.

2022-12-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: gribozavr2, xazax.hun. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. The comments describing the API for analy

[PATCH] D140344: [clang][dataflow] In optional model, implement `widen` and make `compare` sound.

2022-12-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, kinu, sgatev. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. This patch includes two rel

[PATCH] D140308: [clang][dataflow][NFC] Fix comments related to widening.

2022-12-19 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 rGd2e4aaf6ac3b: [clang][dataflow][NFC] Fix comments related to widening. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D140430: [clang][dataflow] Fix bug in handling of `return` statements.

2022-12-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. The handling of return statements, added

[PATCH] D140501: [clang][dataflow] Account for global variables in constructor initializers.

2022-12-21 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Previously, the analysis modeled global v

[PATCH] D140506: [clang][dataflow] Simplify handling of nullopt-optionals.

2022-12-21 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Previously, in the case of an optional co

[PATCH] D140506: [clang][dataflow] Simplify handling of nullopt-optionals.

2022-12-22 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 rG0e8d4a6df959: [clang][dataflow] Simplify handling of nullopt-optionals. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D140501: [clang][dataflow] Account for global variables in constructor initializers.

2022-12-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3700bdb7f00: [clang][dataflow] Account for global variables in constructor initializers. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D140430: [clang][dataflow] Fix bug in handling of `return` statements.

2022-12-22 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 rG38404df9d879: [clang][dataflow] Fix bug in handling of `return` statements. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D123032: [clang][dataflow] Exclude protobuf types from modeling in the environment.

2022-12-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 484830. ymandel added a comment. Herald added a subscriber: martong. Herald added a reviewer: NoQ. Reviving this patch, addressing some of the earlier concerns. However, I may have a better solution which makes this patch irrelevant. So, still WIP. Reposito

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2022-12-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Previously, the model for structs modeled

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:1551-1552 +const Value *FooVal = Env.getValue(*FooLoc); +// TODO: Initialise values inside unions, then change below to +// ASSERT_TRUE. +ASSERT_FALS

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2022-12-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 485393. ymandel added a comment. address comments; fix lifetime bug in new code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 Files: clang/include/clang/Analysis

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2022-12-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Merges `TransferOptions` into the newly-i

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:1551-1552 +const Value *FooVal = Env.getValue(*FooLoc); +// TODO: Initialise values inside unions, then change below to +// ASSERT_TRUE. +ASSERT_FALS

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:1551-1552 +const Value *FooVal = Env.getValue(*FooLoc); +// TODO: Initialise values inside unions, then change below to +// ASSERT_TRUE. +ASSERT_FALS

[PATCH] D140434: readability-const-return-type: don't diagnose a template function returning T, even if sometimes instantiated with e.g. T = const int.

2022-12-27 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140434/new/ https://reviews.llvm.org/D140434 __

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-28 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/unittests/Analysis/FlowSensitive/TransferTest.cpp:1551-1552 +const Value *FooVal = Env.getValue(*FooLoc); +// TODO: Initialise values

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. > Since (afaik) lambdas don't have these constructors, the input to > builtinTransferInitializer shouldn't come from a lambda. I thought they might because they need to store captured variables. But, godbolt doesn't show any custom constructors so seems they don't. I h

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2022-12-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 485488. ymandel added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140703/new/ https://reviews.llvm.org/D140703 Files: clang/include/clang/Analysis/FlowSensitive/DataflowA

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. another thought: please verify that `createStorageLoction` and `createValue` can correctly handle union types. Otherwise, you'll likely end up with other (surprising) crashes in the system. E.g. https://github.com/llvm/llvm-project/blob/781eabeb40b8e47e3a46b0b927784e63f

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D140696#4019589 , @merrymeerkat wrote: >> another thought: please verify that `createStorageLoction` and `createValue` >> can correctly handle union types. Otherwise, you'll likely end up with other >> (surprising) crashes i

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D140696#4019810 , @gribozavr2 wrote: >> With this change, unions are modeled exactly as structs (as far as I can >> tell), which is unsound. > > Modeling just the storage of the union (but not the value) is sound. The > firs

[PATCH] D140859: [clang][dataflow] Allow analyzing multiple functions in unit tests

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp:59 +if (SM.isPointWithin(Loc, BoundingRange.getBegin(), + BoundingRange.getEnd())) { + LineNumberToContent[SM.getP

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D140696#4020209 , @merrymeerkat wrote: > @ymandel - thank you for pointing all of this out! And no need to apologise > at all :) > > I agree that the changes made here are not ideal. But the alternative is also > not ideal.

[PATCH] D140897: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s.

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. The invariants around `ReferenceValues` a

[PATCH] D140894: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-03 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-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp:48 + HeaderFileExtensions, +

[PATCH] D140921: [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, the checker only recognizes th

[PATCH] D140921: [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.

2023-01-03 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 rG0086a3555ac6: [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor. (authored by ymandel). Changed prior to commit: htt

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Gabor -- do you want to review before I land this patch (Dmitri already accepted it)? thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 ___

[PATCH] D140897: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s.

2023-01-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 486250. ymandel added a comment. add clarifying comment regarding interpration of `DecompositionDecl`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140897/new/ https://reviews.llvm.org/D140897 Files: clang/

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 486657. ymandel added a comment. rebase onto HEAD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 486658. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. In D140694#4026244 , @xazax.hun wrote: > This is a big improvement, I skimmed through it and looks good to me. There > might be some sneaky ways to change values of fields without mention

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 486659. ymandel marked an inline comment as done. ymandel added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 Files: clang/include/clang/Analy

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 48. ymandel added a comment. fix broken test (from rebase) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 Files: clang/include/clang/Analysis/FlowSensitive/Dat

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-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 rG5e8f597c2fed: [clang][dataflow] Only model struct fields that are used in the function being… (authored by ymandel). Repository: rG LLVM Github Mo

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I'll revert now and take a look in the morning... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 ___ cfe-commits mailing list cfe-comm

[PATCH] D123032: [clang][dataflow] Exclude protobuf types from modeling in the environment.

2023-01-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel abandoned this revision. ymandel added a comment. Abandoning in favor of https://reviews.llvm.org/D140694. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123032/new/ https://reviews.llvm.org/D123032

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 486926. ymandel added a comment. fix use-after-free bug in test. Possible cause of buildbot failures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 Files: clang/i

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 487506. ymandel added a comment. fix memory error that cause buildbot failures Fixes a self-move assign. This operation should be safe, but is known to cause problems in some implementations of the standard library. The patch drops the assignment, which was u

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel closed this revision. ymandel added a comment. Committed: https://reviews.llvm.org/rG01ccf7b3cee58dbe02fd97696cae1781746b6137 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 __

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 487516. ymandel added a comment. rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140703/new/ https://reviews.llvm.org/D140703 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h cl

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 487538. ymandel added a comment. Initialize AnalysisOptions as a struct, avoiding a use-after-move bug from incorrect use of the fluent (rvalue-ref) API. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140703/new

[PATCH] D141319: [clang][dataflow][NFC] Refine names and comments for field filtering.

2023-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Tweaks elements of the new API fo

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 487769. ymandel added a comment. use `std::optional` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140703/new/ https://reviews.llvm.org/D140703 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnaly

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:89 + ? DataflowAnalysisContext::Options{} + : llvm::Optional()}) {} xazax.hun wrote: > If we already change this code, I thi

[PATCH] D140703: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext::Options`.

2023-01-10 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 rG264976d98e78: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext… (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D141319: [clang][dataflow][NFC] Refine names and comments for field filtering.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG089a54469f63: [clang][dataflow][NFC] Refine names and comments for field filtering. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1413

[PATCH] D141384: [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. There were two (small) bugs causi

[PATCH] D141384: [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation.

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ce03c42dbb4: [clang][dataflow] Fix 2 bugs in `MemberExpr` interpretation. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141384/new/

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, sgatev, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, the API for a model's

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 472975. ymandel marked 2 inline comments as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137334/new/ https://reviews.llvm.org/D137334 Files: clang/include/cla

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:365 if (IsSet1 == nullptr) - return true; + return IsSet2 ? ComparisonStatus::Same : ComparisonStatus::Di

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 472978. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137334/new/ https://reviews.llvm.org/D137334 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironm

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 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 rGc0725865b188: [clang][dataflow] Generalize custom comparison to return tri-value result. (authored by ymandel). Repository: rG LLVM Github Monorep

[PATCH] D137432: [clang][dataflow] Change transfer and diagnoser functions to receive a CFGElement

2022-11-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for this patch! Unfortunately, I'm having trouble following the change. Can you expand the description to give a more detailed explantion of the motivation and the key point that are changing? Unfortunately, I don't understand the motivation for the new API an

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. - Adds API support for widening o

[PATCH] D137968: [clang-tidy] Ignore overriden methods in `readability-const-return-type`.

2022-11-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: njames93, thomasetter. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang-tools-extra. Overrides are constrained by the signature of the ov

[PATCH] D137968: [clang-tidy] Ignore overriden methods in `readability-const-return-type`.

2022-11-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475224. ymandel added a comment. Add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137968/new/ https://reviews.llvm.org/D137968 Files: clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.

[PATCH] D137972: [clang-tidy] Optionally ignore findings in macros in `readability-const-return-type`.

2022-11-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: njames93, thomasetter. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang-tools-extra. Adds support for options-controlled configuration of

[PATCH] D137968: [clang-tidy] Ignore overriden methods in `readability-const-return-type`.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475440. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137968/new/ https://reviews.llvm.org/D137968 Files: clang-tools-extra/clang-tidy/readability/ConstReturnTypeChe

[PATCH] D137972: [clang-tidy] Optionally ignore findings in macros in `readability-const-return-type`.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475441. ymandel added a comment. reorder release notes blurb Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137972/new/ https://reviews.llvm.org/D137972 Files: clang-tools-extra/clang-tidy/readability/ConstRe

[PATCH] D137968: [clang-tidy] Ignore overriden methods in `readability-const-return-type`.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3afd16b65eb: [clang-tidy] Ignore overriden methods in `readability-const-return-type`. (authored by thomasetter, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137972: [clang-tidy] Optionally ignore findings in macros in `readability-const-return-type`.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa49fcca9e3ec: [clang-tidy] Optionally ignore findings in macros in `readability-const-return… (authored by thomasetter, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475468. ymandel added a comment. Rewrite widen-related comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137948/new/ https://reviews.llvm.org/D137948 Files: clang/include/clang/Analysis/FlowSensitive/D

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475469. ymandel marked an inline comment as done. ymandel added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137948/new/ https://reviews.llvm.org/D137948 Files: clang/include/clang/Analy

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475478. ymandel marked 2 inline comments as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137948/new/ https://reviews.llvm.org/D137948 Files: clang/include/cla

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done and 2 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:68 +/// `LatticeT` can optionally provide the following members: +/// * `bool widen(const LatticeT &Pr

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Tooling/SourceCodeTest.cpp:249-258 Visitor.runOverAnnotated(R"cpp( - #define ATTR __attribute__((deprecated("message"))) - $r[[ATTR + $r[[__attribute__((deprecated("message"))) int x;]])cpp");

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475544. ymandel marked 7 inline comments as done. ymandel added a comment. reshape widen to update in place. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137948/new/ https://reviews.llvm.org/D137948 Files:

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 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/DataflowAnalysis.h:114 bool isEqualTypeErased(const TypeErasedLattice &E1, const TypeErasedLattice &E2) final { const

[PATCH] D137948: [clang][dataflow] Add widening API and implement it for built-in boolean model.

2022-11-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 475548. ymandel marked an inline comment as done. ymandel added a comment. tweaks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137948/new/ https://reviews.llvm.org/D137948 Files: clang/include/clang/Analysi

[PATCH] D137979: parse: process GNU and standard attributes on top-level decls

2022-11-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Tooling/SourceCodeTest.cpp:259-268 + // Includes attributes through macro expansion. + Visitor.runOverAnnotated(R"cpp( + #define MACRO_EXPANSION __attribute__((deprecated("message"))) + $r[[MACRO_EXPANSION +

[PATCH] D138204: [clang-tidy] Fix misc-unused-using-decls for user-defined literals

2022-11-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. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138204/new/ https://reviews.llvm.org/D138204 ___

[PATCH] D138204: [clang-tidy] Fix misc-unused-using-decls for user-defined literals

2022-11-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D138204#3933861 , @v1nh1shungry wrote: > @ymandel Thank you for reviewing! > > If this patch is okay to land, could you please help me commit it? Thanks > again! Sure. I'm running tests now and, assuming all's green, i'll co

[PATCH] D138204: [clang-tidy] Fix misc-unused-using-decls for user-defined literals

2022-11-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8003c1d61e69: [clang-tidy] Fix misc-unused-using-decls for user-defined literals (authored by v1nh1shungry, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D142468: [clang][dataflow] Fix bug in handling of reference-typed fields.

2023-01-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, sgatev, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. This patch fixes a subtle bug in

[PATCH] D142468: [clang][dataflow] Fix bug in handling of reference-typed fields.

2023-01-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 491806. ymandel added a comment. use `isa_and_nonnull` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142468/new/ https://reviews.llvm.org/D142468 Files: clang/lib/Analysis/FlowSensitive/Transfer.cpp clang/

[PATCH] D142468: [clang][dataflow] Fix bug in handling of reference-typed fields.

2023-01-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:209 if (VD->getType()->isReferenceType()) { + assert(isValidReferenceLoc(*DeclLoc, Env) && + "reference-typed declarations map

[PATCH] D142468: [clang][dataflow] Fix bug in handling of reference-typed fields.

2023-01-24 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. ymandel marked an inline comment as done. Closed by commit rGb84ac96a35c7: [clang][dataflow] Fix bug in handling of reference-typed fields. (authored by ymandel). Repo

[PATCH] D142710: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

2023-01-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sgatev, gribozavr2, xazax.hun. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, the interpretation of

[PATCH] D142710: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

2023-01-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:524 -void transferSwap(const StorageLocation &OptionalLoc1, - const StorageLocation &OptionalLoc2, -

[PATCH] D142710: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

2023-01-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added a comment. Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142710/new/ https://reviews.llvm.org/D142710 ___ cfe-commits mailing list cfe

[PATCH] D140897: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s.

2023-01-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 493646. ymandel added a comment. Rebase onto HEAD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140897/new/ https://reviews.llvm.org/D140897 Files: clang/lib/Analysis/FlowSensitive/Transfer.cpp clang/unitt

[PATCH] D140897: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s.

2023-02-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D140897#4094945 , @xazax.hun wrote: > I hope we will be able to get rid of this `SkipPast` thing at some point by > looking at the value categories of the AST instead. Thanks! Agreed: filed issue #60444. Repository: rG LL

[PATCH] D142710: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

2023-02-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D142710#4094934 , @xazax.hun wrote: > This change looks good to me. I wonder, however, whether the behavior should > be parameterized in the future. E.g., whether the user of the analysis should > be able to make a decision w

[PATCH] D140897: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s.

2023-02-01 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 rG02562804d074: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s. (authored by ymandel). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D142710: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

2023-02-01 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 rGd4fb829b7180: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`. (authored by ymandel). Repository: rG LLVM Github Mo

[PATCH] D142710: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

2023-02-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D142710#4097032 , @xazax.hun wrote: > In D142710#4096325 , @ymandel wrote: > >> In D142710#4094934 , @xazax.hun >> wrote: >> >>> This change l

<    5   6   7   8   9   10   11   12   13   14   >