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

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

[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 , const Expr , Environment ) { + if (auto *Val =

[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] D150137: [clang][dataflow][NFC] Remove `SkipPast` param from `getValue(const ValueDecl &)`.

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/

[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

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

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

[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

[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

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

[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

[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] 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 = + createStorageLocation(ParamDecl->getType().getNonReferenceType());

[PATCH] D149151: [clang][dataflow][NFC] Remove `SkipPast` parameter from `getStorageLocation(const ValueDecl &).

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

[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

[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 models dependency on libc++ internals. (authored by ymandel). Repository: rG LLVM Github Monorepo

[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

[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

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

[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

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

[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

[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

[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 () { -return takeOwnership(std::make_unique()); - } +

[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] D144730: [FlowSensitive] Log analysis progress for debugging purposes

2023-03-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Awesome, thanks! Comment at: clang/include/clang/Analysis/FlowSensitive/Logger.h:18 + +class ControlFlowContext; +class TypeErasedDataflowAnalysis; Maybe comment on the need for these vs including the

[PATCH] D146507: [clang][dataflow][NFC] Eliminate StmtToEnvMap interface.

2023-03-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. thanks! Comment at: clang/include/clang/Analysis/FlowSensitive/Transfer.h:36-40 +auto BlockIt = CFCtx.getStmtToBlock().find((S)); +assert(BlockIt != CFCtx.getStmtToBlock().end()); +const auto =

[PATCH] D146514: [clang][dataflow] Fix crash when RHS of `&&` or `||` calls `noreturn` func.

2023-03-21 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. Nice! Thank you. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:174-175 + if (RHSVal == nullptr) { +// If the RHS isn't reachable, this implies that if we end up evaluating +// this

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

2023-03-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp:141 + }; + S foo(); + )cc"; gribozavr2 wrote: > Is `foo()` used for anything in this test? not that I can see. looks left over from some

[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

[PATCH] D143128: [-Wunsafe-buffer-usage] Fix-Its transforming `[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

[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

[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

[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

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

[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

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

[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

[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

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

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

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

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

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

2023-02-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd4fb829b7180: [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`. (authored by ymandel). Repository: rG LLVM Github

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

2023-02-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG02562804d074: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s. (authored by ymandel). Repository: rG LLVM Github Monorepo

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

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

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

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

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

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

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

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

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

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

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

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

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

2023-01-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rGb84ac96a35c7: [clang][dataflow] Fix bug in handling of reference-typed fields. (authored by ymandel).

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

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

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

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

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

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

[PATCH] 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: dont diagnose a template function returning T… (authored by suertreus, committed by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[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

[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

[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

[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

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

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

[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

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

[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

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

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

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

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

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

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

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

2023-01-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG264976d98e78: [clang][dataflow] Unify `TransferOptions` and `DataflowAnalysisContext… (authored by ymandel). Repository: rG LLVM Github Monorepo

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2023-01-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e8f597c2fed: [clang][dataflow] Only model struct fields that are used in the function being… (authored by ymandel). Repository: rG LLVM Github

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0086a3555ac6: [clang][dataflow] Fix bug in optional-checkers handling of nullopt constructor. (authored by ymandel). Changed prior to commit:

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

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

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

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp:48 + HeaderFileExtensions, +

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

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

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

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

<    1   2   3   4   5   6   7   8   9   10   >