[PATCH] D159284: [clang][dataflow] Fix Record initialization with InitListExpr and inheritances

2023-09-07 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf9026cfb7680: [clang][dataflow] Fix Record initialization with InitListExpr and inheritances (authored by kinu, committed by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D159284: [clang][dataflow] Fix Record initialization with InitListExpr and inheritances

2023-09-06 Thread Martin Böhme via Phabricator via cfe-commits
mboehme accepted this revision. mboehme added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:2498 +TEST(TransferTest, ReturnStructWithInheritance) { + // This is a crash repro. (Returning a st

[PATCH] D159284: [clang][dataflow] Fix Record initialization with InitListExpr and inheritances

2023-09-05 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:688-690 + for ([[maybe_unused]] auto [Field, Loc] : FieldLocs) { +assert(ModeledFields.contains(cast_or_null(Field))); + } https://llvm.org/docs/CodingStand

[PATCH] D158407: [clang][dataflow] #llvm #flow-analysis Simplify formula at CNF construction time, and short-cut solving of known contradictory formulas.

2023-09-04 Thread Martin Böhme 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 rGb50c87d1e63f: [clang][dataflow] #llvm #flow-analysis Simplify formula at CNF construction… (authored by burakemir, committed by mboehme). Repositor

[PATCH] D159284: [clang][dataflow] Fix Record initialization with InitListExpr and inheritances

2023-09-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:632-635 +// For type comparison assertions. +[[maybe_unused]] auto GetCanonicalType = [](QualType Ty) { +return Ty.getCanonicalType().getUnqualifiedType(); +}; ---

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

2023-09-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme accepted this revision. mboehme added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:53 +// +// FIXME: this function is a hook that enable unsoundness in support of +// convergence. On

[PATCH] D159262: [clang][dataflow] Eliminate deprecated `ControlFlowContext::build()` overload.

2023-09-04 Thread Martin Böhme 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 rGbf46b0b55101: [clang][dataflow] Eliminate deprecated `ControlFlowContext::build()` overload. (authored by mboehme). Repository: rG LLVM Github Mon

[PATCH] D159264: [clang][dataflow] Remove deprecated synonyms related to `RecordStorageLocation` and `RecordValue`

2023-09-04 Thread Martin Böhme 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 rGd948d9121f10: [clang][dataflow] Remove deprecated synonyms related to `RecordStorageLocation`… (authored by mboehme). Repository: rG LLVM Github M

[PATCH] D159274: [clang][dataflow] When dumping `ExprToVal`, dump the `Value`, not just its location.

2023-09-04 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG266c12a1bd60: [clang][dataflow] When dumping `ExprToVal`, dump the `Value`, not just its… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

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

2023-09-04 Thread Martin Böhme 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 rG37458c66bfef: [clang][dataflow] Eliminate deprecated `DataflowAnalysis` constructor. (authored by mboehme). Repository: rG LLVM Github Monorepo C

[PATCH] D159264: [clang][dataflow] Remove deprecated synonyms related to `RecordStorageLocation` and `RecordValue`

2023-09-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Failing pre-merge checks look unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159264/new/ https://reviews.llvm.org/D159264 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D159262: [clang][dataflow] Eliminate deprecated `ControlFlowContext::build()` overload.

2023-09-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Failing pre-merge checks look unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159262/new/ https://reviews.llvm.org/D159262 ___ cfe-commits mailing list cfe-commits@lists.

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

2023-09-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Failing pre-merge checks look unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159261/new/ https://reviews.llvm.org/D159261 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D159274: [clang][dataflow] When dumping `ExprToVal`, dump the `Value`, not just its location.

2023-08-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This makes `ExprToVal` dumping consistent with `

[PATCH] D159264: [clang][dataflow] Remove deprecated synonyms related to `RecordStorageLocation` and `RecordValue`

2023-08-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://r

[PATCH] D159262: [clang][dataflow] Eliminate deprecated `ControlFlowContext::build()` overload.

2023-08-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://r

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

2023-08-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://r

[PATCH] D159090: [clang][dataflow][NFC] Remove obsolete references to `ReferenceValue` from comments.

2023-08-29 Thread Martin Böhme 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 rG6eb1b237f5ec: [clang][dataflow][NFC] Remove obsolete references to `ReferenceValue` from… (authored by mboehme). Repository: rG LLVM Github Monore

[PATCH] D159090: [clang][dataflow][NFC] Remove obsolete references to `ReferenceValue` from comments.

2023-08-29 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `ReferenceValue` was removed in https://reviews.

[PATCH] D158977: [clang][dataflow] Don't associate prvalue expressions with storage locations.

2023-08-29 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG330d5bcbf610: [clang][dataflow] Don't associate prvalue expressions with storage locations. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D158977: [clang][dataflow] Don't associate prvalue expressions with storage locations.

2023-08-29 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D158977#4623402 , @xazax.hun wrote: > Thanks! Sometimes I am wondering whether we actually need a full map for > PRValues. E.g., once we processed a `MaterializeTemporaryExpr`, we now have a > location for the value, and it f

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

2023-08-28 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaef05a12329c: [clang][dataflow][NFC] Eliminate `getStorageLocation()` / `setStorageLocation… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

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

2023-08-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead, inline them into the `getStableStorageL

[PATCH] D158977: [clang][dataflow] Don't associate prvalue expressions with storage locations.

2023-08-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead, map prvalue expressions directly to val

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

2023-08-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme accepted this revision. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:113 + // Don't do anything special for CXXForRangeStmt, because the condition (being + // implicitly generated) isn't visible from the loo

[PATCH] D158630: [clang][dataflow][WIP] Prototype for pointer value widening ("unknown storage location" flavor)

2023-08-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 553021. mboehme added a comment. Added comment on self-referential data structurs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158630/new/ https://reviews.llvm.org/D158630 Files: clang/include/clang/Analys

[PATCH] D158592: [clang][dataflow] Produce pointer values for callees of member operator calls.

2023-08-24 Thread Martin Böhme 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 rG4866a6e1d332: [clang][dataflow] Produce pointer values for callees of member operator calls. (authored by mboehme). Repository: rG LLVM Github Mon

[PATCH] D158592: [clang][dataflow] Produce pointer values for callees of member operator calls.

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. CI failure looks unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158592/new/ https://reviews.llvm.org/D158592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D158630: [clang][dataflow][WIP] Prototype for pointer value widening ("unknown storage location" flavor)

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. DO NOT REVIEW This is a WIP for discussion only

[PATCH] D158628: [clang][dataflow][WIP] Prototype for pointer value widening (nullable `getPointeeLoc()` flavor)

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. DO NOT REVIEW This is a WIP for discussion only

[PATCH] D158592: [clang][dataflow] Produce pointer values for callees of member operator calls.

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Calls to member operators are a special case in

[PATCH] D158513: [clang][dataflow] Add two repros for non-convergence involving pointers in loops.

2023-08-23 Thread Martin Böhme 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 rGa1a63d68a468: [clang][dataflow] Add two repros for non-convergence involving pointers in… (authored by mboehme). Repository: rG LLVM Github Monore

[PATCH] D158513: [clang][dataflow] Add two repros for non-convergence involving pointers in loops.

2023-08-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. pre-merge failure appears to be unrelated to this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158513/new/ https://reviews.llvm.org/D158513 ___ cfe-commits mailing list c

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-08-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. I've broken out the tests into https://reviews.llvm.org/D158513, as it seems clear we want to get these submitted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156658/new/ https://reviews.llvm.org/D156658 ___

[PATCH] D158513: [clang][dataflow] Add two repros for non-convergence involving pointers in loops.

2023-08-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These are broken out from https://reviews.llvm.org/D156658, which it now seems

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-08-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Sorry for the late response -- I was on vacation. In D156658#4554347 , @xazax.hun wrote: > In D156658#4552965 , @mboehme wrote: > >> I've investigated this in more detail. Unfortunately,

[PATCH] D156859: [clang][dataflow] In `ControlFlowContext`, handle `Decl` by reference instead of pointer.

2023-08-02 Thread Martin Böhme 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 rGe6cd409fc639: [clang][dataflow] In `ControlFlowContext`, handle `Decl` by reference instead… (authored by mboehme). Repository: rG LLVM Github Mon

[PATCH] D156856: [clang][dataflow] In `equivalentTo()`, ignore expression locations that are unlikely to matter.

2023-08-02 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 546456. mboehme added a comment. Add a FIXME noting that this is a temporary solution. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156856/new/ https://reviews.llvm.org/D156856 Files: clang/include/clang/An

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-08-02 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D156658#4546955 , @xazax.hun wrote: >> It looks as if, instead, what we should be doing to improve convergence in a >> sound manner is to implement widening for ExprToLoc. I'll submit a >> corresponding patch shortly. > > +1,

[PATCH] D156859: [clang][dataflow] In `ControlFlowContext`, handle `Decl` by reference instead of pointer.

2023-08-02 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `build()` guarantees that we'll always have a `D

[PATCH] D156856: [clang][dataflow] In `equivalentTo()`, ignore expression locations that are unlikely to matter.

2023-08-02 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The locations of some glvalue expressions are di

[PATCH] D156788: [clang][dataflow] Rename `AggregateStorageLocation` to `RecordStorageLocation` and `StructValue` to `RecordValue`.

2023-08-01 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9ecdbe3855a8: [clang][dataflow] Rename `AggregateStorageLocation` to `RecordStorageLocation`… (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D156788?vs=546021&id=546201#toc Re

[PATCH] D156790: [clang][dataflow] Remove deprecated `Strict` accessors.

2023-08-01 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c1a519ee423: [clang][dataflow] Remove deprecated `Strict` accessors. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156790/new/ https

[PATCH] D156790: [clang][dataflow] Remove deprecated `Strict` accessors.

2023-08-01 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://r

[PATCH] D156788: [clang][dataflow] Rename `AggregateStorageLocation` to `RecordStorageLocation` and `StructValue` to `RecordValue`.

2023-08-01 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Both of these constructs are used to represent

[PATCH] D156674: [clang][dataflow] Remove `Strict` suffix from accessors.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb244b6ae0b21: [clang][dataflow] Remove `Strict` suffix from accessors. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156674/new/ http

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

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mboehme marked an inline comment as done. Closed by commit rGf76f6674d822: [clang][dataflow] Use `Strict` accessors where we weren't using them yet. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D156673: [clang][dataflow] Remove deprecated accessors as well as `SkipPast`.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG17ba278f7611: [clang][dataflow] Remove deprecated accessors as well as `SkipPast`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15667

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Retracting from review. I think I was overly hasty with this change: - There are edges between expressions that cross CFG block boundaries but don't involve block terminators. Here's an example -- [B1 .1] ha

[PATCH] D156674: [clang][dataflow] Remove `Strict` suffix from accessors.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 545615. mboehme added a comment. Rebased to head Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156674/new/ https://reviews.llvm.org/D156674 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironme

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

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:545 + &cast(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 Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 545611. mboehme added a comment. Use `Loc == nullptr` instead of `!Loc`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156672/new/ https://reviews.llvm.org/D156672 Files: clang/lib/Analysis/FlowSensitive/Dat

[PATCH] D156674: [clang][dataflow] Remove `Strict` suffix from accessors.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For the time being, we're keeping the `Strict` v

[PATCH] D156673: [clang][dataflow] Remove deprecated accessors as well as `SkipPast`.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends On D156672

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

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This eliminates all uses of the deprecated acces

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 545571. mboehme added a comment. Use `dyn_cast_or_null` instead of `dyn_cast`. (Children can be null.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156658/new/ https://reviews.llvm.org/D156658 Files: clang/

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 545561. mboehme added a comment. Make check for `Value` equivalence consistent with the corresponding check for `LocToVal`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156658/new/ https://reviews.llvm.org/D15

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Retracting from review momentarily -- I've just realized that I should be comparing values the same way this is done for the `LocToVal` map. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156658/new/ https://reviews.llvm.or

[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

2023-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The only entries in `ExprToLoc` that will be rea

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

2023-07-27 Thread Martin Böhme 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 rGe95134b9cb18: [clang][dataflow] Reverse course on `getValue()` deprecation. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D155922: [clang][dataflow] Eliminate `ReferenceValue`.

2023-07-27 Thread Martin Böhme 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 rG1b334a2ae7af: [clang][dataflow] Eliminate `ReferenceValue`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Pre-merge failure looks unrelated. It's in AST/Interp/literals.cpp, and this patch shouldn't affect that in any way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155921/new/ https://reviews.llvm.org/D155921 _

[PATCH] D155922: [clang][dataflow] Eliminate `ReferenceValue`.

2023-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Pre-merge failure looks unrelated. It's in AST/Interp/literals.cpp, and this patch shouldn't affect that in any way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155922/new/ https://reviews.llvm.org/D155922 _

[PATCH] D156411: [clang][dataflow] HTMLLogger: Don't crash if CFG contains unreachable blocks.

2023-07-27 Thread Martin Böhme 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 rG771d7d71df41: [clang][dataflow] HTMLLogger: Don't crash if CFG contains unreachable blocks. (authored by mboehme). Repository: rG LLVM Github Mono

[PATCH] D156411: [clang][dataflow] HTMLLogger: Don't crash if CFG contains unreachable blocks.

2023-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Pre-merge failure looks unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156411/new/ https://reviews.llvm.org/D156411 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D156402: [clang][dataflow] Don't crash when constructing an array of records.

2023-07-27 Thread Martin Böhme 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 rGe6e83cbcc748: [clang][dataflow] Don't crash when constructing an array of records. (authored by mboehme). Repository: rG LLVM Github Monorepo CHA

[PATCH] D156402: [clang][dataflow] Don't crash when constructing an array of records.

2023-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. CI failures look unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156402/new/ https://reviews.llvm.org/D156402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D156411: [clang][dataflow] HTMLLogger: Don't crash if CFG contains unreachable blocks.

2023-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://r

[PATCH] D156402: [clang][dataflow] Don't crash when constructing an array of records.

2023-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When I wrote https://reviews.llvm.org/D155446, I

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

2023-07-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 544337. mboehme added a comment. Rebase to head Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155921/new/ https://reviews.llvm.org/D155921 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironmen

[PATCH] D155922: [clang][dataflow] Eliminate `ReferenceValue`.

2023-07-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 544336. mboehme added a comment. Rebase to head Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155922/new/ https://reviews.llvm.org/D155922 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironmen

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

2023-07-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 544335. mboehme added a comment. Rebase to head Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155921/new/ https://reviews.llvm.org/D155921 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironmen

[PATCH] D156229: [clang][dataflow] Remove checks that test for consistency between `StructValue` and `AggregateStorageLocation`.

2023-07-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme abandoned this revision. mboehme added a comment. This is a duplicate of https://reviews.llvm.org/D155813 that I uploaded for some reason. Sorry for the noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156229/new/ https://reviews.llvm.

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

2023-07-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme accepted this revision. mboehme added a comment. This revision is now accepted and ready to land. Note this appears to have clang-format errors Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:58-63 + if (llvm::Expected> Errors = +

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

2023-07-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme accepted this revision. mboehme added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:244 +/// Runs a dataflow analysis over the given function and then runs `Diagnoser` +/// ove

[PATCH] D156230: [clang][dataflow][NFC] Eliminate variable only used in assertion.

2023-07-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Abandoning. Already fixed at head in https://github.com/llvm/llvm-project/commit/e71bae94b04391cb47680622666d448418c0d972 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156230/new/ https://reviews.llvm.org/D156230

[PATCH] D156230: [clang][dataflow][NFC] Eliminate variable only used in assertion.

2023-07-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This can break release builds that set `-Werror`

[PATCH] D156229: [clang][dataflow] Remove checks that test for consistency between `StructValue` and `AggregateStorageLocation`.

2023-07-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Now that the redundancy between these two classes has been eliminated, these c

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

2023-07-24 Thread Martin Böhme via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. mboehme marked 3 inline comments as done. Closed by commit rG44f98d0101fe: [clang][dataflow] Eliminate duplication between `AggregateStorageLocation` and… (authored by

[PATCH] D155813: [clang][dataflow] Remove checks that test for consistency between `StructValue` and `AggregateStorageLocation`.

2023-07-24 Thread Martin Böhme 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 rGc3cf630d80a2: [clang][dataflow] Remove checks that test for consistency between `StructValue`… (authored by mboehme). Repository: rG LLVM Github M

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

2023-07-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 4 inline comments as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Value.h:201 -/// Models a value of `struct` or `class` type, with a flat map of fields to -/// child storage locations, containing all accessible memb

[PATCH] D155922: [clang][dataflow] Eliminate `ReferenceValue`.

2023-07-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There are no remaining uses of this class in the

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

2023-07-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In the value categories RFC

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

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG477ee05f83c6: [clang][dataflow] Add an `operator<<` for `OptionalTypeIdentifier`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155788

[PATCH] D155802: [clang][dataflow] Print the source line if we saw unexpected diagnostics in tests.

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8b5d3ba829c1: [clang][dataflow] Print the source line if we saw unexpected diagnostics in… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D155813: [clang][dataflow] Remove checks that test for consistency between `StructValue` and `AggregateStorageLocation`.

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Now that the redundancy between these two classes has been eliminated, these c

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

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. CI failures look unrelated: - Windows failure is in SemaCXX/static-assert-cxx26.cpp. I can't see a way in which this patch should affect the failure of this test (the dataflow framework isn't used in Clang itself) - check-format

[PATCH] D155802: [clang][dataflow] Print the source line if we saw unexpected diagnostics in tests.

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This makes it easier to determine which line the unexpected happened on; previ

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

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:466 + return; +Env.setStorageLocationStrict(*S, *MemberLoc); } ymandel wrote: > This diff makes me very happy. :) Me too

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

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 542337. mboehme marked 11 inline comments as done. mboehme added a comment. Changes in response to review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155446/new/ https://reviews.llvm.org/D155446 Fil

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

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 542330. mboehme added a comment. Format code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155788/new/ https://reviews.llvm.org/D155788 Files: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessM

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

2023-07-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When tests fail in UncheckedOptionalAccessModelTest.cpp, this prints the name

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

2023-07-19 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 16 inline comments as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:337-338 + /// Returns the location of the result object that a prvalue `E` of record + /// type initializes. + ///

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

2023-07-19 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 541980. mboehme added a comment. Various changes in response to review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155446/new/ https://reviews.llvm.org/D155446 Files: clang/include/clang/Analysis/

[PATCH] D155067: [clang][dataflow] Strengthen flow condition assertions.

2023-07-18 Thread Martin Böhme 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 rG6236bf53418e: [clang][dataflow] Strengthen flow condition assertions. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D155067: [clang][dataflow] Strengthen flow condition assertions.

2023-07-18 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 541454. mboehme added a comment. Adapted to `Formula` changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155067/new/ https://reviews.llvm.org/D155067 Files: clang/unittests/Analysis/FlowSensitive/Transfer

[PATCH] D155465: [clang][dataflow] Bugfix for `refreshStructValue()`.

2023-07-17 Thread Martin Böhme 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 rG0f6cf5556749: [clang][dataflow] Bugfix for `refreshStructValue()`. (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D15546

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

2023-07-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 541021. mboehme added a comment. Added bugfix for `refreshStructValue()` as a diffbase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155446/new/ https://reviews.llvm.org/D155446 Files: clang/include/clang/A

[PATCH] D155465: [clang][dataflow] Bugfix for `refreshStructValue()`.

2023-07-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In the case where the expression was not yet ass

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

2023-07-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. After this change, `StructValue` is just a wrapp

  1   2   3   4   5   6   >