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

2023-01-12 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 rGd34fbf2d9bf4: [clang][dataflow] In optional model, implement `widen` and make `compare` sound. (authored by ymandel). Repository: rG LLVM Github M

[PATCH] D141634: [libTooling] Add `getFileRange` as an alternative to `getRangeForEdit`

2023-01-12 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. Can you add a test? probably valuable even if its nearly identical to the test for `getRangeForEdit`. Comment at: clang/include/clang/Tooling/Transformer/SourceCode.h:120-

[PATCH] D141636: [libTooling] Rename `getRangeForEdit` as `getFileRangeForEdit`

2023-01-12 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/D141636/new/ https://reviews.llvm.org/D141636 __

[PATCH] D141709: [clang][dataflow] Fix bug in joining bool values.

2023-01-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sgatev, 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 code assumes that

[PATCH] D141716: [clang][dataflow] Add (initial) debug printing for `Value` and `Environment`.

2023-01-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sgatev, 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. Also adds uses of the new printin

[PATCH] D141716: [clang][dataflow] Add (initial) debug printing for `Value` and `Environment`.

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

[PATCH] D141716: [clang][dataflow] Add (initial) debug printing for `Value` and `Environment`.

2023-01-19 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/DataflowEnvironment.cpp:792 + // fields are printed. + llvm::dbgs() << "DeclToLoc:\n"; + for (auto [D, L] : DeclToLoc) sgatev wrote: > Shouldn

[PATCH] D141716: [clang][dataflow] Add (initial) debug printing for `Value` and `Environment`.

2023-01-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. ymandel marked an inline comment as done. Closed by commit rGc441f65f9183: [clang][dataflow] Add (initial) debug printing for `Value` and `Environment`. (authored by ym

[PATCH] D141709: [clang][dataflow] Fix bug in joining bool values.

2023-01-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 rGdaa316bcaf71: [clang][dataflow] Fix bug in joining bool values. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

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

2023-01-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Sure, please ping me if you don't see a commit by EOD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140434/new/ https://reviews.llvm.org/D140434 ___ cfe-commits mailing list cfe-

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

2023-01-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D140434#4071823 , @carlosgalvezp wrote: > In D140434#4053053 , @suertreus > wrote: > >> Thanks for reviewing. >> >> I don't have commit access; can someone who does please do the thin

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

2023-01-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a11b23c0238: readability-const-return-type: don't diagnose a template function returning T… (authored by suertreus, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D127434: [clang][dataflow] In `optional` model, match call return via hasType

2022-06-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 rGcd0d52610d80: [clang][dataflow] In `optional` model, match call return via hasType (authored by samestep, committed by ymandel). Repository: rG LL

[PATCH] D127502: [clang][dataflow] Don't `assert` full LHS coverage in `optional` model

2022-06-10 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. Do I understand correctly that the test you added in D127434 covers this change as well? (in that this change moves it from crashing to not crashing) Rep

[PATCH] D127502: [clang][dataflow] Don't `assert` full LHS coverage in `optional` model

2022-06-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa9ad689e352d: [clang][dataflow] Don't `assert` full LHS coverage in `optional` model (authored by samestep, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

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

2022-06-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Ping... Gabor, Stanislav: what are your thoughts on this patch? I think we're in a place where I could do performance comparisons before/after if you think that's justified. Alternatively, I have a relatively simple proposal for

[PATCH] D125931: [clang][dataflow] Add support for correlated branches to optional model

2022-06-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. I love the tests (pretty cool examples of what can be handled). Thanks for the thoroughness! Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessMo

[PATCH] D125931: [clang][dataflow] Add support for correlated branches to optional model

2022-06-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:174 +/// property of the optional value `OptionalVal`. +void setHasValue(StructValue &OptionalVal, BoolValue &HasValueVal) { + OptionalVal.setProperty("has_value"

[PATCH] D127746: [clang][dataflow] Convert `PointeeLoc` of `PointerValue` from reference to pointer.

2022-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Herald added a subscriber: martong. Overall, this seems to be an important API change, and I'm having trouble seeing the big picture here. I think it would be great if you could expand (in the CL description) on the motivation behind the change and the thinking behind

[PATCH] D127865: [clang][dataflow] Make `Value` and `StorageLocation` non-copyable

2022-06-15 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/D127865/new/ https://reviews.llvm.org/D127865 __

[PATCH] D127898: [clang][dataflow] Find unsafe locs after fixpoint

2022-06-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:35 +using NoopDiags = std::tuple<>; + I'm not sure that this is valid style. It's essentially a unit type, which I quite like, but I've never seen this don

[PATCH] D128013: [clang][dataflow] Add support for comma binary operator

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

[PATCH] D128060: [clang][dataflow] Extend flow condition in the body of a for loop

2022-06-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Mild preference for splitting into three tests, since it technically different code that's covered in each. But, up to you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128060/new/ https://

[PATCH] D126973: [clang][dataflow] Relax assumption that `AggregateStorageLocations` correspond to struct type.

2022-06-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel abandoned this revision. ymandel added a comment. In D126973#3592537 , @xazax.hun wrote: > With properties moved up in the hierarchy this could be abandoned now, right? Yes, I think that would be best. Thanks for the reminder! Repository: rG

[PATCH] D126316: [clang][dataflow] Make limit on fixpoint-algorithm iterations proportional to size of CFG.

2022-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, li.zhe.hua, sgatev. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, the maximum number of iterations of the l

[PATCH] D126316: [clang][dataflow] Make limit on fixpoint-algorithm iterations proportional to size of CFG.

2022-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 431761. ymandel added a comment. Reinstated absolute limit of 2^16. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126316/new/ https://reviews.llvm.org/D126316 Files: clang/lib/Analysis/FlowSensitive/TypeEras

[PATCH] D126316: [clang][dataflow] Make limit on fixpoint-algorithm iterations proportional to size of CFG.

2022-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D126316#3535057 , @tschuett wrote: > or `min(MaxAverageVisitsPerBlock * BlockStates.size(), 2^16);` Good idea, thx. In D126316#3535077 , @xazax.hun wrote: > An alternative approach i

[PATCH] D126316: [clang][dataflow] Make limit on fixpoint-algorithm iterations proportional to size of CFG.

2022-05-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. Closed by commit rG6eb9e0f5ebb9: [clang][dataflow] Make limit on fixpoint-algorithm iterations proportional to… (authored by ymandel). Repository: rG LLVM Github Mon

[PATCH] D126314: [clang][dataflow] Relax `Environment` comparison operation.

2022-05-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. Closed by commit rG2f93bbb9cd7c: [clang][dataflow] Relax `Environment` comparison operation. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D126405: [clang][dataflow] Relax assert on existence of `this` pointee storage

2022-05-25 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. Please wait for at least one more "accept". thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126405/new/ https://reviews.llvm.org/D126405

[PATCH] D126413: [clang][dataflow] Fix incorrect CXXThisExpr pointee for lambdas

2022-05-25 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:1526 + int Foo = Bar; + // [[p]] +}(); please use differe

[PATCH] D126419: [clang][dataflow] Improve handling of constructor initializers.

2022-05-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sgatev, li.zhe.hua, xazax.hun. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, we assert that `CXXCtorInitializer`s are

[PATCH] D126420: [clang][dataflow] Remove private-field filtering from `StorageLocation` creation.

2022-05-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sgatev, xazax.hun, li.zhe.hua. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. The API for `AggregateStorageLocation` does not allo

[PATCH] D126420: [clang][dataflow] Remove private-field filtering from `StorageLocation` creation.

2022-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 432249. ymandel added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126420/new/ https://reviews.llvm.org/D126420 Files: clang/lib/Analysis/FlowSensitive/DataflowEnvironment

[PATCH] D126420: [clang][dataflow] Remove private-field filtering from `StorageLocation` creation.

2022-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:407 for (const FieldDecl *Field : getAccessibleObjectFields(Type)) { assert(Field != nullptr); sgatev wrote

[PATCH] D126420: [clang][dataflow] Remove private-field filtering from `StorageLocation` creation.

2022-05-27 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 rG67136d0e8fb5: [clang][dataflow] Remove private-field filtering from `StorageLocation`… (authored by ymandel

[PATCH] D126419: [clang][dataflow] Improve handling of constructor initializers.

2022-05-27 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 rG3682e22ef404: [clang][dataflow] Improve handling of constructor initializers. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D126759: [clang][dataflow] Model calls returning optionals

2022-06-01 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/D126759/new/ https://reviews.llvm.org/D126759 __

[PATCH] D126806: Add an overload to ASTUnit::LoadFromASTFile that accepts a virtual file system.

2022-06-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Why add an overload rather than adding it before `UseDebugInfo` and defaulting it to `getRealFileSystem()`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126806/new/ https://reviews.llvm.org/D126806 __

[PATCH] D126806: Add an overload to ASTUnit::LoadFromASTFile that accepts a virtual file system.

2022-06-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. To be clear, I'm fine with the change either way, just want to understand a bit better first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126806/new/ https://reviews.llvm.org/D126806

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-06-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Luca, Can you expand the description to give a better intuition as to what this check is finding that the diagnostic does not? The example is good, but it would be helpful if you could phrase the general rule being enforced. Similarly, that would be helpful in the doc

[PATCH] D126972: [clang][dataflow] Modify optional-checker to handle type aliases.

2022-06-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, sgatev. Herald added subscribers: tschuett, steakhal, jeroen.dobbelaere, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Previously, type aliases were not handled (an

[PATCH] D126972: [clang][dataflow] Modify optional-checker to handle type aliases.

2022-06-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 434048. ymandel marked an inline comment as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126972/new/ https://reviews.llvm.org/D126972 Files: clang/lib/Analysi

[PATCH] D126973: [clang][dataflow] Relax assumption that `AggregateStorageLocations` correspond to struct type.

2022-06-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, sgatev. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, when an `AggregateStorageLocation` is mapped to a `St

[PATCH] D126972: [clang][dataflow] Modify `optional` model to handle type aliases.

2022-06-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D126972#3556230 , @xazax.hun wrote: > This patch looks good to me. On the other hand, I was wondering whether > functions like this would be handled: > > pair f(); > array g(); > MyStructWithOptionals h(); > > And so on.

[PATCH] D126973: [clang][dataflow] Relax assumption that `AggregateStorageLocations` correspond to struct type.

2022-06-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D126973#3556312 , @xazax.hun wrote: > Does this mean you want to use `StructValue`s for non-struct types to have > access to properties? I wonder if it would be a cleaner approach to be able > to assign properties to any type

[PATCH] D126972: [clang][dataflow] Modify `optional` model to handle type aliases.

2022-06-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 rG6adfc64e709c: [clang][dataflow] Modify `optional` model to handle type aliases. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D127008: [clang][dataflow] Fix filename typos in tests

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

[PATCH] D126973: [clang][dataflow] Relax assumption that `AggregateStorageLocations` correspond to struct type.

2022-06-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D126973#3558304 , @gribozavr2 wrote: >> using the StructValue for its properties, while modeling a non-struct type. > > Could you explain the use case in more details? A `StructValue` is used to model a complex underlying typ

[PATCH] D127196: [clang][dataflow] Enable use of synthetic properties on all Value instances.

2022-06-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127196/new/ https://reviews.llvm.org/D127196 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D127008: [clang][dataflow] Fix filename typos in tests

2022-06-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdcb4950d5b5b: [clang][dataflow][NFC] Fix filename typos in tests (authored by samestep, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D126888: Add a parameter to LoadFromASTFile that accepts a file system and defaults to the real file-system.

2022-06-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d6d069f4e9a: Add a parameter to LoadFromASTFile that accepts a file system and defaults to… (authored by asoffer, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124932: [clang][dataflow] Track `optional` contents in `optional` model.

2022-06-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 435528. ymandel added a comment. rebase and merge Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124932/new/ https://reviews.llvm.org/D124932 Files: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAc

[PATCH] D124932: [clang][dataflow] Track `optional` contents in `optional` model.

2022-06-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 435537. ymandel added a comment. add missing blank line to test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124932/new/ https://reviews.llvm.org/D124932 Files: clang/lib/Analysis/FlowSensitive/Models/Unche

[PATCH] D124932: [clang][dataflow] Track `optional` contents in `optional` model.

2022-06-09 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 rGdd38caf3b5b7: [clang][dataflow] Track `optional` contents in `optional` model. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D127434: [clang][dataflow] In `optional` model, match call return via hasType

2022-06-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Is there a test you can add that would cover this change? Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:170 + // multiple overloads of `hasType` match. + ast_matchers::internal::Matcher typeMatcher = anyOf( +

[PATCH] D155446: [clang][dataflow] Eliminate duplication between `AggregateStorageLocation` and `StructValue`.

2023-07-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I got up to Transfer.cpp and figured I should send along what I have. Looks very good so far! I should have the rest of the review in a few hours... Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:337-338 + /// Returns

[PATCH] D155636: [clang][dataflow] Add function to `WatchedLiteralsSolver` that reports whether the iteration limit has been reached.

2023-07-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, mboehme. Herald added a subscriber: martong. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. This change provides a centralized record of whether

[PATCH] D155636: [clang][dataflow] Add function to `WatchedLiteralsSolver` that reports whether the iteration limit has been reached.

2023-07-18 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 rG1defa781243f: [clang][dataflow] Add function to `WatchedLiteralsSolver` that reports whether… (authored by ymandel). Repository: rG LLVM Github Mo

[PATCH] D155446: [clang][dataflow] Eliminate duplication between `AggregateStorageLocation` and `StructValue`.

2023-07-19 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. This is really impressive. Thank you! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:337-338 + /// Returns the location of the result obje

[PATCH] D155788: [clang][dataflow] Add an `operator<<` for `OptionalTypeIdentifier`.

2023-07-20 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/D155788/new/ https://reviews.llvm.org/D155788 ___

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-21 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D155890#4521266 , @carlosgalvezp wrote: > This should be a configuration option, we should not hardcore > project-specific things in the source code. I agree, but we already are hardcoding specific types -- I think this is a

[PATCH] D155921: [clang][dataflow] Reverse course on `getValue()` deprecation.

2023-07-21 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. This sounds reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155921/new/ https://reviews.llvm.org/D155921

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-21 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D155890#4523243 , @adukeman wrote: > In D155890#4522266 , @ymandel wrote: > >> In D155890#4521266 , >> @carlosgalvezp wrote: >> >>> This shoul

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 543552. ymandel marked 2 inline comments as done. ymandel added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files: clang/include/

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Analysis/Analyses/IntervalPartition.h:101-103 +/// groups topologically. As a result, the blocks in a series of loops are +/// ordered such that all nodes in loop `i` are earlier in the order than nodes +/// in loop `

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D155890#4525144 , @carlosgalvezp wrote: > I have opened a refactoring ticket here: > https://github.com/llvm/llvm-project/issues/64037 Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D155890#4528560 , @carlosgalvezp wrote: > The review is marked as accepted, should we land it? Let me know if you need > help with that :) We're still waiting on some small changes: https://reviews.llvm.org/D155890#inline-1

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, mboehme. Herald added a subscriber: martong. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. The convenience function captures running the analysi

[PATCH] D156255: [clang-tidy] Update unchecked-optiona-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, mboehme. Herald added subscribers: PiotrZSL, ChuanqiXu, carlosgalvezp. Herald added a reviewer: NoQ. Herald added a reviewer: njames93. Herald added a project: All. ymandel requested review of this revision. Herald added projects: c

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544364. ymandel marked an inline comment as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156254/new/ https://reviews.llvm.org/D156254 Files: clang/include/cla

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544367. ymandel marked 4 inline comments as done. ymandel added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156254/new/ https://reviews.llvm.org/D156254 Files: clang/include/clan

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:261-265 + using ::llvm::Expected; + + Expected Context = ControlFlowContext::build(FuncDecl); + if (!Context) +return Context

[PATCH] D156255: [clang-tidy] Update unchecked-optional-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544370. ymandel added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156255/new/ https://reviews.llvm.org/D156255 Files: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAcces

[PATCH] D156255: [clang-tidy] Update unchecked-optional-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544415. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156255/new/ https://reviews.llvm.org/D156255 Files: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCh

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 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 rG1429240ed63b: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and… (authored by

[PATCH] D156255: [clang-tidy] Update unchecked-optional-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 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 rGe9570d1e59ba: [clang-tidy] Update unchecked-optiona-access-check to use convenience function… (authored by ymandel). Repository: rG LLVM Github M

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544551. ymandel marked 2 inline comments as done. ymandel added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files: clang/include/c

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 5 inline comments as done. ymandel added a comment. Thanks for the helpful suggestions! Comment at: clang/include/clang/Analysis/Analyses/IntervalPartition.h:104 +/// intervals) if and only if it is reducible (its limit flow graph has one +/// node). Returns `nul

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-27 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 rG26db5e651bb6: [clang][CFG] Support construction of a weak topological ordering of the CFG. (authored by yma

[PATCH] D156672: [clang][dataflow] Use `Strict` accessors where we weren't using them yet.

2023-07-31 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/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:542 +State.Env.getStorageLocationStrict(*E)); +if (!Loc) { + Loc

[PATCH] D156672: [clang][dataflow] Use `Strict` accessors where we weren't using them yet.

2023-07-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. SGTM Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:545 + &cast(State.Env.createStorageLocation(*E)); + State.Env.setStorageLocationStrict(*E, *Loc); +} ---

[PATCH] D157033: [clang][CFG] Fix 2 memory errors in interval computation.

2023-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. This fixes 2 bugs and adds corresponding tests. Both related to unreachable blocks. One occured i

[PATCH] D157033: [clang][CFG] Fix 2 memory errors in interval computation.

2023-08-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 547008. ymandel added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157033/new/ https://reviews.llvm.org/D157033 Files: clang/lib/Analysis/IntervalPartition.cpp clang/unittests/Analysis/I

[PATCH] D157033: [clang][CFG] Fix 2 memory errors in interval computation.

2023-08-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 547305. ymandel added a comment. rebase onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157033/new/ https://reviews.llvm.org/D157033 Files: clang/lib/Analysis/IntervalPartition.cpp clang/unittests/

[PATCH] D153071: [clang][dataflow] Refactor `DataflowWorklist` types and add a WTO version.

2023-08-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 547315. ymandel added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153071/new/ https://reviews.llvm.org/D153071 Files: clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h clang

[PATCH] D157033: [clang][CFG] Fix 2 memory errors in interval computation.

2023-08-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe21b1dd9cc53: [clang][CFG] Fix 2 memory errors in interval computation. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157033/new/ htt

[PATCH] D153071: [clang][dataflow] Refactor `DataflowWorklist` types and add a WTO version.

2023-08-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 547344. ymandel added a comment. rebase onto main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153071/new/ https://reviews.llvm.org/D153071 Files: clang/include/clang/Analysis/FlowSensitive/DataflowWorklis

[PATCH] D153071: [clang][dataflow] Refactor `DataflowWorklist` types and add a WTO version.

2023-08-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D153071#4561993 , @xazax.hun wrote: > Mea culpa. Looks like I did not anticipate non-RPO worklists. Thanks for > cleaning this up, looks good to me! Thanks! Not anticipating the future is pretty standard, no need to apologize

[PATCH] D153071: [clang][dataflow] Refactor `DataflowWorklist` types and add a WTO version.

2023-08-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9824ec875cec: [clang][dataflow] Refactor `DataflowWorklist` types and add a WTO version. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D159355: [clang][dataflow] Unsoundly treat "Unknown" as "Equivalent" in widening.

2023-09-07 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 rG80f0dc3aa4bf: [clang][dataflow] Unsoundly treat "Unknown" as "Equivalent" in widening. (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D153273: [analyzer] Rework support for CFGScopeBegin, CFGScopeEnd, CFGLifetime elements

2023-07-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D153273#4471672 , @steakhal wrote: > I'd appreciate some review on this, given that a lot of you would be affected > by the changes of CFG. > By changes I mean, fixes for goto statements, properly calling destructors > and st

[PATCH] D154597: [clang][dataflow] Various refactorings to UncheckedOptionalAccessModel.

2023-07-06 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. Nice! I don't think you need a second review for this one, since it's just superficial (if important!) refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D153273: [analyzer] Rework support for CFGScopeBegin, CFGScopeEnd, CFGLifetime elements

2023-07-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:773 void addLoopExit(const Stmt *LoopStmt); - void addAutomaticObjDtors(LocalScope::const_iterator B, -LocalScope::const_iterator E, Stmt *S); -

[PATCH] D154948: [dataflow] improve determinism of generated SAT system

2023-07-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thank you, Sam! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154948/new/ https://reviews.llvm.org/D154948 ___ cfe-commits mailing list cfe-commit

[PATCH] D154969: [dataflow] document flow condition

2023-07-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Nice! Definitely should have been defined earlier... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154969/new/ https://reviews.llvm.org/D154969 ___ cfe-commits mailing list cfe-c

[PATCH] D155075: [clang][dataflow] Add `DataflowEnvironment::createObject()`.

2023-07-12 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. Looks great! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:609 + StorageLocation &createObjectInternal(const VarDecl *D, QualType Ty, +

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 541141. ymandel added a comment. Radically simplify the code, per comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files: clang/include/clang/Analysis/Anal

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 541153. ymandel marked 12 inline comments as done. ymandel added a comment. tweaks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files: clang/include/clang/Analys

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the very helpful feedback! I think I've addressed all of the suggestions/concerns. I suspect there's yet more room for improvement in the algorithm, but I think we're converging on "good enough". Comment at: clang/include/clang/Analysis/An

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