[PATCH] D144987: [clang][dataflow] Fix missed fields in field set construction.

2023-02-28 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. When building the set of referenc

[PATCH] D144987: [clang][dataflow] Fix missed fields in field set construction.

2023-02-28 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 rG73c98831f648: [clang][dataflow] Fix missed fields in field set construction. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D143128: [-Wunsafe-buffer-usage] Fix-Its transforming `&DRE[any]` to `(DRE.data() + any)`

2023-03-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D143128#4167626 , @jkorous wrote: > This is an interesting topic. In the abstract I see the question as: "Should > the Fix-Its prioritize how the code will fit the desired end state > (presumably modern idiomatic C++) or care

[PATCH] D144546: [clang][dataflow] Fix assert for CXXConstructExpr argument number

2023-03-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D144546#4167161 , @steakhal wrote: > By looking at the title, I get the impression that this fixes an assertion > violation. > I also observed that this commit is part of `main` but not part of > `release/16.x`, hence the `cl

[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: clang/includ

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

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

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

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

[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: clang/include/clang/Analysis/Analyses/IntervalPartition.

[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
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). Reposit

[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: clang/include/clang/Analysis/Analyses/Inte

[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: clang/include/clang/Analysis/Analyses/IntervalPartiti

[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] 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 https://lists

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

[PATCH] D147326: [clang][dataflow][NFC] Share code between Environment ctor and pushCallInternal().

2023-03-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thank you! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:465 + /// referenced in `FuncDecl`. `FuncDecl` must have a body. + void initVars(const FunctionDecl *FuncDecl);

[PATCH] D147302: [clang][dataflow] Add `create()` methods to `Environment` and `DataflowAnalysisContext`.

2023-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thanks! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:215 /// Creates an atomic boolean value. - AtomicBoolValue &createAtomicBoolValue() { -return takeOwnership(std::make_uniqu

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-14 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. This patch refines the matching of the re

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:262 /// Returns true if and only if `Type` is an optional type. bool isOptionalType(QualType Type) { if (!Type->isRecordType()) xazax.hun wro

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:262 /// Returns true if and only if `Type` is an optional type. bool isOptionalType(QualType Type) { if (!Type->isRecordType()) ymandel wrote

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 513727. ymandel added a comment. Improves the matcher and adds (missing) `std` qualifier to one of the names. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148344/new/ https://reviews.llvm.org/D148344 Files:

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-14 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/Models/UncheckedOptionalAccessModel.cpp:262 /// Returns true if and only if `Type` is an optional type. bool isOptionalType(QualType Type) { if (!Type->isRe

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 513730. ymandel added a comment. tweaks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148344/new/ https://reviews.llvm.org/D148344 Files: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.

[PATCH] D148377: [clang][dataflow] Drop optional model's dependency on libc++ internals.

2023-04-14 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. Adjusts the matchers in the optional mode

[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 (Block.succ_beg

[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] D143735: [clang][dataflow] Convert nonnull pointer parameter to a reference.

2023-02-10 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 parameter in question belongs to a fu

[PATCH] D143735: [clang][dataflow] Convert nonnull pointer parameter to a reference.

2023-02-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Just realized this is actually more complicated to change, assuming I also want to update all the derived classes. For now, I'll limit the scope of the change to these files, but I'll follow up with an overload-based solution to admit either kind of derived class until

[PATCH] D143735: [clang][dataflow] Convert nonnull pointer parameter to a reference.

2023-02-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 496477. ymandel added a comment. add fixme and fix compilation error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143735/new/ https://reviews.llvm.org/D143735 Files: clang/include/clang/Analysis/FlowSensiti

[PATCH] D143735: [clang][dataflow] Convert nonnull pointer parameter to a reference.

2023-02-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 rGa00f17d81efb: [clang][dataflow] Convert nonnull pointer parameter to a reference. (authored by ymandel). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D143750: [clang-tidy] Clarify documention of `bugprone-unchecked-optional-access`.

2023-02-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2, sgatev. Herald added a subscriber: rnkovacs. Herald added a reviewer: njames93. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang-tools-extra. Removes a reference to g

[PATCH] D143750: [clang-tidy] Clarify documention of `bugprone-unchecked-optional-access`.

2023-02-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 496527. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143750/new/ https://reviews.llvm.org/D143750 Files: clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecke

[PATCH] D143750: [clang-tidy] Clarify documention of `bugprone-unchecked-optional-access`.

2023-02-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst:278 + +Given that ``value()`` has well-defined program termination behavior, why treat +it the same as ``operator*

[PATCH] D143750: [clang-tidy] Clarify documention of `bugprone-unchecked-optional-access`.

2023-02-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. ymandel marked an inline comment as done. Closed by commit rGe7e577f68421: [clang-tidy] Clarify documention of `bugprone-unchecked-optional-access`. (authored by ymande

[PATCH] D143920: [clang][dataflow] Change `transfer` API to take a reference.

2023-02-13 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 provided `CFGElement` is never null,

[PATCH] D143920: [clang][dataflow] Change `transfer` API to take a reference.

2023-02-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6b991ba486b6: [clang][dataflow] Change `transfer` API to take a reference. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D149869: [clang][dataflow] Remove deprecated pass-through APIs for DataflowAnalysisContext.

2023-05-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe875de2a3e8e: [clang][dataflow] Remove deprecated pass-through APIs for… (authored by bazuzi, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

cfe-commits@lists.llvm.org

2023-05-08 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! It's really exciting to see this concept being erased from the API! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150137/new/ https://

[PATCH] D149838: [clang][dataflow] Eliminate `SkipPast::ReferenceThenPointer`.

2023-05-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:840 +return nullptr; + } else { +return cast(Loc); nit: no need for `else` since `if` branch always returns Repository:

[PATCH] D150655: [clang][dataflow] Use `Strict` accessors in more places in Transfer.cpp.

2023-05-16 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/Transfer.cpp:138 +static void forwardValue(const Expr &From, const Expr &To, Environment &Env) { + if (auto *Val = Env.g

[PATCH] D150656: [clang][dataflow] Use `Strict` accessors in TypeErasedDataflowAnalysis.cpp.

2023-05-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:310-317 } else { +auto *InitStmtVal = Env.getValueStrict(*InitStmt); +if (InitStmtVal == nullptr) + return; + auto &Mem

[PATCH] D150653: [clang][dataflow] Add `Strict` versions of `Value` and `StorageLocation` accessors.

2023-05-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I'm a little confused by one of the points in the description: > `setValueStrict()`: The RFC proposes that this should always create the same > StorageLocation for a given Value, but, in fact, the transfer functions that > exist today don't guarantee this; almost all tr

[PATCH] D150653: [clang][dataflow] Add `Strict` versions of `Value` and `StorageLocation` accessors.

2023-05-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D150653#4346025 , @mboehme wrote: > In D150653#4345771 , @ymandel wrote: > >> I'm a little confused by one of the points in the description: >> >>> `setValueStrict()`: The RFC proposes

[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. - .CaseOfCFGStmt(valueOperatorCall(

[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, mbo

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

[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: clang-tools-extra/clang-tidy/google/TodoCommentCh

[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", false)),

[PATCH] D148344: [clang][dataflow] Refine matching of optional types to anchor at top level.

2023-04-17 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 rGcd22e0dc9d0b: [clang][dataflow] Refine matching of optional types to anchor at top level. (authored by ymandel). Repository: rG LLVM Github Monore

[PATCH] D148377: [clang][dataflow] Drop optional model's dependency on libc++ internals.

2023-04-17 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 rG09b462ef8539: [clang][dataflow] Drop optional model's dependency on libc++ internals. (authored by ymandel). Repository: rG LLVM Github Monorepo

[PATCH] D148554: [dataflow] Extract arena for Value/StorageLocation out of DataflowAnalysisContext

2023-04-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Love it! Thanks. Comment at: clang/include/clang/Analysis/FlowSensitive/Arena.h:129 +} // namespace clang::dataflow \ No newline at end of file add newline? Repository: rG LLVM Github Monorepo CHANG

cfe-commits@lists.llvm.org

2023-04-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149151/new/ https://reviews.llvm.org/D149151 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D149144: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment::DeclToLoc`.

2023-04-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Really nice patch. Thanks for this improvement! Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:307-311 + auto &ParamLoc = + createStorageLocation(ParamDecl->getType().getNonReferenceTyp

[PATCH] D149464: [clang][dataflow] Expose DataflowAnalysisContext from DataflowEnvironment.

2023-04-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. Thanks and welcome! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149464/new/ https://reviews.llvm.org/D149464 ___

[PATCH] D149464: [clang][dataflow] Expose DataflowAnalysisContext from DataflowEnvironment.

2023-04-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D149464#4306226 , @bazuzi wrote: > Thanks! Seems like you have commit access, Yitzie; could you commit this for > me as "Samira Bazuzi "? Sure. Let's wait til Gabor approves, but then I'll go ahead. Repository: rG LLVM Gi

[PATCH] D149585: [clang][dataflow] Optimize case of degenerate `do-while` loops.

2023-05-01 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. In general, the iteration algorit

[PATCH] D149585: [clang][dataflow] Optimize case of degenerate `do-while` loops.

2023-05-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel abandoned this revision. ymandel added a comment. This approach is buggy. Pulling back until I have a proper fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149585/new/ https://reviews.llvm.org/D149585 __

[PATCH] D149464: [clang][dataflow] Expose DataflowAnalysisContext from DataflowEnvironment.

2023-05-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2cdb6b84c157: [clang][dataflow] Expose DataflowAnalysisContext from DataflowEnvironment. (authored by bazuzi, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D149640: [clang][dataflow] Change PruneTriviallyFalseEdges for building CFG

2023-05-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149640/new/ https://reviews.llvm.org/D149640 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D149144: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment::DeclToLoc`.

2023-05-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:329 + // against this above. + ProcessVarDecl(*VD); + auto *VDLoc = Env.getStorageLocation(*VD); mboehme wrote: > y

[PATCH] D149640: [clang][dataflow] Change PruneTriviallyFalseEdges for building CFG

2023-05-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149640/new/ https://reviews.llvm.org/D149640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D145581: [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments.

2023-05-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D145581#4223656 , @mboehme wrote: > In D145581#4223185 , @PiotrZSL > wrote: > >> And actually there is issue for this: >> https://github.com/llvm/llvm-project/issues/57758 > > Thanks

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

[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: clang/include/clang/Analysis/Analyses/Interval

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

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

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

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

[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 , @x

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

[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: clang/include/clang/Analysis/Analyses/IntervalPartition.h

[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: clang/include/clang/Analysis/An

[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: clang/include/clang/Analysis/Analyses/IntervalPartit

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

[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] D139360: [clang][dataflow] Support (in)equality operators in `optional` model.

2022-12-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, 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 adds interpretation of the overloa

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: 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. This patch adds interpretation of binding declaratio

[PATCH] D139360: [clang][dataflow] Support (in)equality operators in `optional` model.

2022-12-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 rG390029be8946: [clang][dataflow] Support (in)equality operators in `optional` model. (authored by ymandel). Repository: rG LLVM Github Monorepo CH

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for clarifying the issues here. A few thoughts: 1. Thanks for clarifying about the blank lines. I was wondering how to read that and I think that fills in an important missing detail for me. 2. I'm particularly interested in the case of tuple-like containers, wh

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Gabor -- An alternative solution to this problem, assuming the current structure of the CFG, is to add a map to the `Environment` of type `VarDecl` -> `BindingDecl` that registers `BindingDecl`s in need of initialization. Then, I could modify the `DeclStmt` interpretati

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Domján -- thanks for the detailed explanations -- this has been really helpful. > After this the get<>() calls simply use this unnamed copy to initialize the > elements from first to last, so everything seems to proceed in order in the > CFG. Agreed -- it definitely sh

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D139544#3982821 , @isuckatcs wrote: >> the temporary's construction should appear before, but the binding decls, >> which use the synthetic variables, should appear after > > I'm confused a bit here. Right now the CFG looks li

[PATCH] D139676: [libTooling] Add flag to getRangeForEdit to ignore macro expansions

2022-12-08 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/Tooling/Transformer/SourceCode.cpp:90-92 + Loc = Expansion.getExpansionLocStart(); + if (Loc.isFileID()) +return true; -

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. > Those BindingDecls never appear in the CFG unless one of the is used. Indeed. That''s the issue (which this discussion has helped clarify) -- the binding decls are not in the CFG and I was expecting them to be. > By the time you see this node, the variable has already

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. > Those BindingDecls never appear in the CFG unless one of the is used. Sorry, I should fix my response above: I *never* see the `BindingDecl`s in the CFG, whether or not they are used. Can you send me an example CFG that contains the BindingDecls? Repository: rG L

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 481651. ymandel added a comment. Simplifies the implementation and removes mention of any potential CFG problem. This new version does the work eagerly by forcing a location for the synthesized variable. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D139544#3984532 , @isuckatcs wrote: >> Sorry, I should fix my response above: I *never* see the BindingDecls in the >> CFG, whether or not they are used. > > It was my fault, I was wrong with the wording. I meant the `DeclRefE

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 481677. ymandel added a comment. remove commented out code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139544/new/ https://reviews.llvm.org/D139544 Files: clang/lib/Analysis/FlowSensitive/Transfer.cpp cl

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139544/new/ https://reviews.llvm.org/D139544 ___ cfe-commits mailing list cfe-comm

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D139544#3984835 , @xazax.hun wrote: > This approach looks good to me. Some context: we kept the CFGs lightweight > because it looks like we did not need to do any extensions for the Clang > Static Analyzer. I'm glad the dataf

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-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 rGef4635452f3a: [clang][dataflow] Add support for structured bindings of tuple-like types. (authored by ymandel). Repository: rG LLVM Github Monorep

[PATCH] D139868: [clang][dataflow] Change the diagnoser API to receive a correctly typed lattice element

2022-12-12 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/TestingSupport.h:134 +PostVisitCFG = +[=](ASTContext &Context, const CFGElement &Element, +co

[PATCH] D139737: [-Wunsafe-buffer-usage] Initiate Fix-it generation for local variable declarations

2022-12-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D139737#3989927 , @NoQ wrote: > Ok so at the conference @ymandel suggested us to use libTooling's > Transformers API to make our lives easier > (https://clang.llvm.org/docs/ClangTransformerTutorial.html). I'm fairly > certai

[PATCH] D140020: [clang][dataflow] Improve optional model's support for ignoring smart pointers.

2022-12-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: 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 optional model has an option to ignore optionals

<    8   9   10   11   12   13   14   15   >