[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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] 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-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] D74692: [clang-tidy] Make bugprone-use-after-move ignore std::move for const values

2020-02-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. I've added some individual comments above, but I'd question whether it's really necessary to make this change? Even if no move actually happens, the code is still wrong (it shouldn't be using std::move in the first place), and it's likely the author actually intended fo

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp:67 +llvm::SmallVector +allInitListExprForms(const InitListExpr *InitList) { + llvm::SmallVector result = {InitList}; PiotrZSL wrote: > maybe some other name instead of

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 505714. mboehme added a comment. Added release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145906/new/ https://reviews.llvm.org/D145906 Files: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp cl

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D145906#4193014 , @PiotrZSL wrote: > Looks good to me, consider adding info to Release notes, that this check has > been improved/fixed support for designated initializers. Good point, done! Repository: rG LLVM Github Mon

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGddbcd985602d: [clang-tidy] Correctly handle evaluation order of designated initializers. (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D145906?vs=505714&id=505719#toc Reposit

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

2023-03-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 506507. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145581/new/ https://reviews.llvm.org/D145581 Files: clang-tools-extra/clang-tidy/utils/E

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

2023-03-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 506510. mboehme added a comment. Added entry to release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145581/new/ https://reviews.llvm.org/D145581 Files: clang-tools-extra/clang-tidy/utils/ExprSequenc

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D145906#4198583 , @PiotrZSL wrote: > Regarding release-notes: > I would probably wrote something like "fixed handling for designated > initializers", nonene will understand things like "sequence point". Thanks, makes sense.

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

2023-03-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Sorry for the delay in replying -- I was caught up in other projects. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:224 + `: + - Fixed handling for designated initializers. + - Fix: In C++17 and later, the callee of a function is guaranteed to

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

2023-03-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. Instead of `StmtToEnvMap`, we pass an `AnalysisC

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

2023-03-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. The crash happened because the transfer fucntion

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 506913. mboehme added a comment. Add back comment that I inadvertently deleted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146507/new/ https://reviews.llvm.org/D146507 Files: clang/include/clang/Analysis/

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Transfer.h:31 - /// there isn't one. - /// FIXME: Ensure that the result can't be null and return a const reference. - virtual const Environment *getEnvironment(const Stmt &S) const = 0;

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 506917. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146514/new/ https://reviews.llvm.org/D146514 Files: clang/include/clang/Analysis/FlowSen

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:399 +template +ValueT &getValueFromDecl(ASTContext &ASTCtx, const Environment &Env, + llvm::StringRef Name) {

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 506919. mboehme marked an inline comment 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/D146514/new/ https://reviews.llvm.org/D146514 Fil

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:52 + /// Returns whether `B` is reachable from the entry block. + bool isBlockReachable(const CFGBlock *B) const { +return Bl

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

2023-03-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1304 + std::unique_ptr a; + a->foo(std::move(a)); +} PiotrZSL wrote: > mboehme wrote: > > PiotrZSL wrote: > > > What about scenario like this: > >

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D146514#4209931 , @xazax.hun wrote: > This fix looks good for me for this particular problem, but I wonder whether > the solution is general enough. In case the analysis figures out that a call > would not return (e.g., the `

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 507287. mboehme added a comment. Reworded comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146514/new/ https://reviews.llvm.org/D146514 Files: clang/include/clang/Analysis/FlowSensitive/ControlFlowCont

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 507288. mboehme added a comment. Reworded comment again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146514/new/ https://reviews.llvm.org/D146514 Files: clang/include/clang/Analysis/FlowSensitive/ControlFl

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. 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 BinaryOpe

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. After some offline discussion with reviewers, we've come to the conclusion that `AnalysisContext` isn't a sufficiently clear abstraction to warrant putting it in a header. For the time being, I'll therefore pursue the less ambitious approach of simply eliminating the `

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 507297. mboehme added a comment. Pursue a less ambitious approach, as described in the previous comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146507/new/ https://reviews.llvm.org/D146507 Files: clan

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

2023-03-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. @gribozavr2 @xazax.hun Just wanted to confirm that you still regard this as ready to land now that I've changed the patch as we discussed offline? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146507/new/ https://reviews.l

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

2023-03-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. In D146514#4213302 , @xazax.hun wrote: > In D146514#4212528 , @mboehme wrote: > >> No, I think this is a different case. > > Sorry, I might have b

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

2023-03-23 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5acd29eb4d9e: [clang][dataflow] Fix crash when RHS of `&&` or `||` calls `noreturn` func. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

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

2023-03-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D145581#4215602 , @PiotrZSL wrote: > Switching status of review, once you will be ready with changes (or your > decision), just mark it ready for review again. Thanks, and sorry for the delayed response on this -- I've been j

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

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

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

2023-03-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 508916. mboehme added a comment. Changes in response to review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146507/new/ https://reviews.llvm.org/D146507 Files: clang/include/clang/Analysis/FlowSens

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

2023-03-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Transfer.h:35 + /// The result is guaranteed never to be null. + virtual const Environment *getEnvironment(const Stmt &S) const { +auto BlockIt =

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

2023-03-28 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 2 inline comments as done. Closed by commit rG0608541aa4b5: [clang][dataflow][NFC] Eliminate StmtToEnvMap interface. (authored by mboehme). Repository:

[PATCH] D147032: [clang][dataflow][NFC] Put TransferVisitor in an unnamed namespace.

2023-03-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. This avoids the risk of ODR violations. Reposi

[PATCH] D147032: [clang][dataflow][NFC] Put TransferVisitor in an unnamed namespace.

2023-03-28 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1bc2d43e5c8f: [clang][dataflow][NFC] Put TransferVisitor in an unnamed namespace. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147032

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

2023-03-08 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This eliminates

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-13 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. As designated i

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 505083. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145906/new/ https://reviews.llvm.org/D145906 Files: clang-tools-extra/clang-tidy/utils/E

[PATCH] D152813: [clang][dataflow] Create `Value`s for integer literals.

2023-06-19 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 rG762cb1d37736: [clang][dataflow] Create `Value`s for integer literals. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D153006: [clang][dataflow] Perform deep copies in copy and move operations.

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

[PATCH] D153006: [clang][dataflow] Perform deep copies in copy and move operations.

2023-06-19 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added a comment. In D153006#4424980 , @xazax.hun wrote: > I am not opposed to this solution, but I do anticipate some performance > problems in the future. I wonder if copy-on-write, or some persistent da

[PATCH] D153006: [clang][dataflow] Perform deep copies in copy and move operations.

2023-06-19 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 532604. mboehme marked an inline comment as done. mboehme added a comment. Use `cast_or_null` instead of `cast` in `VisitCXXOperatorCallExpr`. Added a test that crashes without this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D152696: Prevent deadlocks in death tests.

2023-06-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D152696#4430238 , @mgorny wrote: > This change is causing a lot of unittests to fail on Gentoo. I've tested both > on amd64 and arm64; on amd64 additionally the test suite seems to hang. > ... Sorry, only just saw this now. I

[PATCH] D153006: [clang][dataflow] Perform deep copies in copy and move operations.

2023-06-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 532812. mboehme added a comment. Now that integer literals are associated with `Value`s, use them in tests instead of using a helper variable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153006/new/ https://r

[PATCH] D153409: BEGIN_PUBLIC [clang][dataflow] Treat fields of anonymous records as being part of their parent.

2023-06-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. See https://en.cppreference.com/w/c/language/str

[PATCH] D153409: BEGIN_PUBLIC [clang][dataflow] Treat fields of anonymous records as being part of their parent.

2023-06-21 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:5433 +// that `i` is modeled. +S->getChild(*IDecl); + }); sammccall wrote: > assert that the result i

[PATCH] D153366: [dataflow] Add dedicated representation of boolean formulas

2023-06-22 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. High-level comment: I like the separation of concerns that this introduces. Would you like me to review https://reviews.llvm.org/D153469 or should we wait for this patch to converge first? Comment at: clang/include/clang/Analysis/FlowSensitive/Formula

[PATCH] D153549: [clang][dataflow] Dump useful debugging information when we crash.

2023-06-22 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 AST of the function we're currently analyz

[PATCH] D153549: [clang][dataflow] Dump useful debugging information when we crash.

2023-06-22 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGefbb4aaacedf: [clang][dataflow] Dump useful debugging information when we crash. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153549/

[PATCH] D153366: [dataflow] Add dedicated representation of boolean formulas

2023-06-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D153366#4441758 , @sammccall wrote: >> Would you like me to review https://reviews.llvm.org/D153469 or should we >> wait for this patch to converge first? > > Similarly it'd be great to get high-level feedback there: whether t

[PATCH] D153469: [dataflow] Replace most BoolValue subclasses with references to Formula (and AtomicBoolValue => Atom and BoolValue => Formula where appropriate)

2023-06-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Just some top-level comments to begin with. In D153469#4439770 , @sammccall wrote: > Here we start to see benefits: Value becomes less reliant on inheritance, > flow conditions are no longer Values that can uselessly bear proper

[PATCH] D153006: [clang][dataflow] Perform deep copies in copy and move operations.

2023-06-26 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf2123af1e7d7: [clang][dataflow] Perform deep copies in copy and move operations. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153006/

[PATCH] D153833: [clang][dataflow] Use namespace qualifiers when defining functions.

2023-06-26 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. See https://llvm.org/docs/CodingStandards.html#

[PATCH] D153006: [clang][dataflow] Perform deep copies in copy and move operations.

2023-06-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/RecordOps.cpp:20 + +void copyRecord(AggregateStorageLocation &Src, AggregateStorageLocation &Dst, +Environment &Env) { MaskRay wr

[PATCH] D153833: [clang][dataflow] Use namespace qualifiers when defining functions.

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

[PATCH] D153833: [clang][dataflow] Use namespace qualifiers when defining functions.

2023-06-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 rG9a4097e9cd89: [clang][dataflow] Use namespace qualifiers when defining functions. (authored by mboehme). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D153409: [clang][dataflow] Treat fields of anonymous records as being part of their parent.

2023-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 534891. mboehme added a comment. Undo all of the non-test changes. This patch now only introduces a test that we can access fields of anonymous structs. I realized based on gribozavr2's comment that we shouldn't be lumping all fields of anonymous records into

[PATCH] D153409: [clang][dataflow] Treat fields of anonymous records as being part of their parent.

2023-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added a comment. PTAL Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:305 +if (Field->isAnonymousStructOrUnion()) + getFieldsFromClassHierarchy(Field->getType(), Fields); +else -

[PATCH] D153851: [clang][dataflow] Output debug info if `getChild()` doesn't find field.

2023-06-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. Depends On D153409

[PATCH] D153852: [clang][dataflow] Initialize fields of anonymous records correctly.

2023-06-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. Previously, the newly added test would crash. D

[PATCH] D153852: [clang][dataflow] Initialize fields of anonymous records correctly.

2023-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:575 assert(InitExpr != nullptr); - -Value *InitExprVal = Env.getValue(*InitExpr, SkipPast::None); -if (InitExprVal == nullptr) - return; - -const FieldDecl *Field = S->g

[PATCH] D153854: [clang][dataflow] Make `getThisPointeeStorageLocation()` return an `AggregateStorageLocation`.

2023-06-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. This avoids the need for casts at callsites. De

[PATCH] D153409: [clang][dataflow] Add a test that we can access fields of anonymous records.

2023-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added a comment. Pre-merge failure looks unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153409/new/ https://reviews.llvm.org/D153409 ___ cfe-com

[PATCH] D153851: [clang][dataflow] Output debug info if `getChild()` doesn't find field.

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

[PATCH] D153852: [clang][dataflow] Initialize fields of anonymous records correctly.

2023-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 535284. mboehme added a comment. Ensure we model a field of an anonymous record even if the only place it's used is in an initializer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153852/new/ https://reviews.l

[PATCH] D153852: [clang][dataflow] Initialize fields of anonymous records correctly.

2023-06-28 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/D153852/new/ https://reviews.llvm.org/D153852 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D153851: [clang][dataflow] Output debug info if `getChild()` doesn't find field.

2023-06-28 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 rG834a84d091ab: [clang][dataflow] Output debug info if `getChild()` doesn't find field. (authored by mboehme). Repository: rG LLVM Github Monorepo

[PATCH] D153409: [clang][dataflow] Add a test that we can access fields of anonymous records.

2023-06-28 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 rGd04b198973c9: [clang][dataflow] Add a test that we can access fields of anonymous records. (authored by mboehme). Repository: rG LLVM Github Monor

[PATCH] D153956: [clang][dataflow] Don't crash if copy constructor arg doesn't have a storage location.

2023-06-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. I accidentally used `cast` instead of `cast_or_n

[PATCH] D153956: [clang][dataflow] Don't crash if copy constructor arg doesn't have a storage location.

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

[PATCH] D153956: [clang][dataflow] Don't crash if copy constructor arg doesn't have a storage location.

2023-06-28 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 rGabc8367413ff: [clang][dataflow] Don't crash if copy constructor arg doesn't have a storage… (authored by mboehme). Repository: rG LLVM Github Mono

[PATCH] D153960: [clang][dataflow] Implement support for pointers to members.

2023-06-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. The newly added tests crash without the other ch

[PATCH] D153852: [clang][dataflow] Initialize fields of anonymous records correctly.

2023-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:356 + Member = cast(I); + MemberLoc = &cast(MemberLoc)->getChild(*Member); +} gribozavr2 wrote: > I

[PATCH] D153854: [clang][dataflow] Make `getThisPointeeStorageLocation()` return an `AggregateStorageLocation`.

2023-06-28 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/D153854/new/ https://reviews.llvm.org/D153854 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D153960: [clang][dataflow] Implement support for pointers to members.

2023-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D153960#4455661 , @gribozavr2 wrote: > Using PointerValue to model pointers to data members does not look right to > me, because a pointer to data member is an offset within an object that we > apply this pointer to, it is n

[PATCH] D153960: [clang][dataflow] Implement support for pointers to members.

2023-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:236 +// `DeclRefExpr`s to fields and non-static methods aren't glvalues, and +// there's also no sensible `Value` we can assign to them, so s

<    1   2   3   4   5   6   >