[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] D159355: [clang][dataflow] Unsoundly treat "Unknown" as "Equivalent" in widening.

2023-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D159355#4640054 , @xazax.hun wrote: > Sorry for the late review. This looks good to me, but I hope we will be able > to undo it soon :) Thanks! Np, and agreed. I think we have a clear path towards dropping the unsoundness

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

2023-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Gabor -- do you want a chance to review (given that it's a non-trivial change to the infrastructure)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159355/new/

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

2023-09-06 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:53 +// +// FIXME: this function is a hook that enable unsoundness in support of +// convergence. Once we have widening support for the

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

2023-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 556051. ymandel added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159355/new/ https://reviews.llvm.org/D159355 Files: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

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

2023-09-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, 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 makes widening act the same

[PATCH] D159261: [clang][dataflow] Eliminate deprecated `DataflowAnalysis` constructor.

2023-08-31 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/D159261/new/ https://reviews.llvm.org/D159261

[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

2023-08-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG824b13659130: [clang][dataflow] Support range-for loops in fixpoint algorithm. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

2023-08-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 553958. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158848/new/ https://reviews.llvm.org/D158848 Files:

[PATCH] D158981: [clang][dataflow][NFC] Eliminate `getStorageLocation()` / `setStorageLocation()` in `DataflowAnalysisContext`.

2023-08-28 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 this! (specifically, that it simplifies the API surface) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158981/new/

[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

2023-08-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:1631 + const AnalysisOutputs &) { +EXPECT_THAT(Results.keys(), UnorderedElementsAre("after_loop")); + }); mboehme wrote: >

[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

2023-08-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 553929. ymandel marked 2 inline comments as done. ymandel added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158848/new/ https://reviews.llvm.org/D158848 Files:

[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

2023-08-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 553505. ymandel added a comment. fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158848/new/ https://reviews.llvm.org/D158848 Files: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp

[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

2023-08-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: mboehme, xazax.hun. 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. Adds support for recognizing range-for loops in the

[PATCH] D158771: [clang][tooling] Fix `name` range-selector to handle TypeLocs correctly.

2023-08-25 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 rGc78325815062: [clang][tooling] Fix `name` range-selector to handle TypeLocs correctly. (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D158771: [clang][tooling] Fix `name` range-selector to handle TypeLocs correctly.

2023-08-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 553471. ymandel added a comment. tweak Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158771/new/ https://reviews.llvm.org/D158771 Files: clang/lib/Tooling/Transformer/RangeSelector.cpp

[PATCH] D158771: [clang][tooling] Fix `name` range-selector to handle TypeLocs correctly.

2023-08-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 553456. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158771/new/ https://reviews.llvm.org/D158771 Files: clang/lib/Tooling/Transformer/RangeSelector.cpp

[PATCH] D158771: [clang][tooling] Fix `name` range-selector to handle TypeLocs correctly.

2023-08-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 553455. 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/D158771/new/ https://reviews.llvm.org/D158771 Files:

[PATCH] D158771: [clang][tooling] Fix `name` range-selector to handle TypeLocs correctly.

2023-08-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sammccall, li.zhe.hua. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Previously, where `name` was applied to a template-specialization TypeLoc, it returned the entire specialization

[PATCH] D158766: [AST] TypeSourceInfo for params of inherited constructor should be null

2023-08-24 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/Sema/SemaDeclCXX.cpp:13895-13896 Context.getTrivialTypeSourceInfo(BaseCtor->getType(), UsingLoc); FunctionProtoTypeLoc ProtoLoc =

[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

[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

[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:

[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/

[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

[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

[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

[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

[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 + (State.Env.createStorageLocation(*E)); + State.Env.setStorageLocationStrict(*E, *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 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] 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

[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

[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:

[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

[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

[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:

[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:

[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

[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:

[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:

[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:

[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

[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:

[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

[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] 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:

[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

[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#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

[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] 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

[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

[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] 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] 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:

[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:

[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:

[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 (const VarDecl *D, QualType Ty, +

[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

[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

[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] 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

[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

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

2023-06-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Analysis/IntervalPartition.cpp:121 +Index.emplace(N, ID); + Graph.Intervals.emplace_back(ID, Header, std::move(Data.Nodes)); } xazax.hun wrote: > It would

[PATCH] D153908: [dataflow] Use consistent, symmetrical, non-mutating erased signature for join()

2023-06-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. LGTM, thanks Sam! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153908/new/ https://reviews.llvm.org/D153908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-06-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added a comment. Rebased, thanks! Comment at: clang/include/clang/Analysis/Analyses/IntervalPartition.h:73 + + // Whether this node is the head of a feedback edge within the interval. + bool IsFeedbackHead = false;

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

2023-06-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 535402. ymandel added a comment. Address more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files:

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

2023-06-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 535397. ymandel added a comment. Rebase and address some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files:

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-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 2 inline comments as done. Closed by commit rGf4cf51c99c74: [clang][CFG] Add support for partitioning CFG into intervals. (authored by ymandel).

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Analysis/IntervalPartition.cpp:26 + + std::queue Worklist; + for (const CFGBlock *S : Header.succs()) xazax.hun wrote: > ymandel wrote: > > xazax.hun wrote: > > > Is

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 535002. ymandel added a comment. Respond to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152263/new/ https://reviews.llvm.org/D152263 Files:

[PATCH] D153493: [dataflow] avoid more accidental copies of Environment

2023-06-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D153493#4450358 , @sammccall wrote: >> I realize the complexity is frustrating, but I don't see how that's related >> to the issue here. The complexity of the `JoinedStateBuilder` is caused by >> the desire to minimize

[PATCH] D153493: [dataflow] avoid more accidental copies of Environment

2023-06-26 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 don't want to block the progress you're making elsewhere and I think the concerns here are sufficiently localized to revisit another time. So, feel free to reify any

[PATCH] D153805: Expose DataflowAnalysisContext.querySolver().

2023-06-26 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/Analysis/FlowSensitive/DataflowAnalysisContext.h:178-181 + /// Possible outcomes are: + /// - `Satisfiable`: A satisfying assignment

[PATCH] D153493: [dataflow] avoid more accidental copies of Environment

2023-06-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Just FYI (since you mentioned it in your description): LatticeEffect is vestigial and should be removed. It's now only used (properly) for widening. Regarding the design. This looks like an optimal solution in terms of copying but introduces lifetime risks and

[PATCH] D153491: [dataflow] Avoid copying environment

2023-06-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D153491#4443704 , @xazax.hun wrote: > This sounds extremely error-prone to me. In case copying the analysis state > has side effects like this, I would argue we want such operations to be > really explicit. What do you

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as not done. ymandel added inline comments. Comment at: clang/lib/Analysis/IntervalPartition.cpp:26 + + std::queue Worklist; + for (const CFGBlock *S : Header.succs()) xazax.hun wrote: > Is it possible we end up adding the same

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 533641. ymandel marked 2 inline comments as done. ymandel added a comment. responded to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152263/new/ https://reviews.llvm.org/D152263 Files:

[PATCH] D153078: [clang][dataflow] Change iteration algorithm to use WTO instead of reverse post order.

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr. 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 patch replaces use of the reverse-post order

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

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr. 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. Removes dependency of the DataflowWorklistBase

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

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 531874. ymandel added a comment. more comment expansion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files:

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

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 531865. ymandel added a comment. Fix build break and add some field comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files:

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

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 531843. ymandel added a comment. fix some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153058/new/ https://reviews.llvm.org/D153058 Files:

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

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. This patch adds support for building a weak topological ordering of the CFG blocks,

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 531702. ymandel added a comment. Expand comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152263/new/ https://reviews.llvm.org/D152263 Files: clang/include/clang/Analysis/Analyses/IntervalPartition.h

[PATCH] D152732: [clang][dataflow] Support limits on the SAT solver to force timeouts.

2023-06-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. In D152732#4415168 , @mboehme wrote: > In D152732#4414707 , @ymandel wrote: > >> In D152732#4414661 ,

[PATCH] D152732: [clang][dataflow] Support limits on the SAT solver to force timeouts.

2023-06-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 rGb639ebaa8f83: [clang][dataflow] Support limits on the SAT solver to force timeouts. (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D152732: [clang][dataflow] Support limits on the SAT solver to force timeouts.

2023-06-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D152732#4414771 , @xazax.hun wrote: > In D152732#4414707 , @ymandel wrote: > >> Ultimately what matters for a user is the global limit. > > I am not 100% sure about that. While it is

[PATCH] D152732: [clang][dataflow] Support limits on the SAT solver to force timeouts.

2023-06-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D152732#4414661 , @xazax.hun wrote: > Huge +1, I think most solvers need to have some resource limits in place as > the runtime can explode. I am just not 100% what is the best approach here, > putting a global limit on the

[PATCH] D152732: [clang][dataflow] Support limits on the SAT solver to force timeouts.

2023-06-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: kinu, xazax.hun, mboehme, sgatev. 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 patch allows the client of a

[PATCH] D152369: [clang][dataflow][NFC] Expand comments on losing values in optional checker.

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

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 528845. ymandel added a comment. fix formatting in header file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152263/new/ https://reviews.llvm.org/D152263 Files:

[PATCH] D152263: [clang][CFG] Add support for partitioning CFG into intervals.

2023-06-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Adds support for the classic dataflow algorithm that partitions a flow graph into

[PATCH] D151194: [clang][dataflow] Add support for return values of reference type.

2023-05-23 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151194/new/ https://reviews.llvm.org/D151194

[PATCH] D151071: [clang][dataflow] Fix a null pointer crash in `computeBlockInputState()`.

2023-05-22 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/TypeErasedDataflowAnalysis.cpp:221-223 // See `NoreturnDestructorTest` for concrete examples. -if

[PATCH] D150872: [clang-tidy] Add support for new TODO style to google-readability-todo

2023-05-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. Thank you for the very fast review! Comment at: clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp:97 : ClangTidyCheck(Name, Context), + UseV2Style(Options.getLocalOrGlobal("UseV2Style",

[PATCH] D150872: [clang-tidy] Add support for new TODO style to google-readability-todo

2023-05-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 523440. ymandel added a comment. Address reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150872/new/ https://reviews.llvm.org/D150872 Files:

[PATCH] D150872: [clang-tidy] Add support for new TODO style to google-readability-todo

2023-05-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: sammccall. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang-tools-extra. Google style is

[PATCH] D150775: [clang][dataflow] Fix a bug in handling of `operator->` for optional checker.

2023-05-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:789 - // of these accessors. - .CaseOfCFGStmt(valueOperatorCall(std::nullopt), [](const CallExpr *E,

[PATCH] D150775: [clang][dataflow] Fix a bug in handling of `operator->` for optional checker.

2023-05-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. Nice catch! Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:789 - // of these accessors. -

  1   2   3   4   5   6   7   8   9   10   >