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

2023-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 535401. mboehme marked an inline comment as done. mboehme added a comment. Don't produce values for pointers to members. For consistency, also make the NullToMemberPointer cast not produce any values. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[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. PTAL Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:447 - StorageLocation *PointeeLoc = Env.getStorageLocationStrict(*SubExpr); - if (PointeeLoc == nullptr) break; While I'm here, streamline the code for th

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

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. mboehme marked an inline comment as done. Closed by commit rGd36324866ee1: [clang][dataflow] Initialize fields of anonymous records correctly. (authored by mboehme). R

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

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 rG74d8455ba6a1: [clang][dataflow] Make `getThisPointeeStorageLocation()` return an… (authored by mboehme). Repository: rG LLVM Github Monorepo CHAN

[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. Pre-merge failure looks unrelated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153960/new/ https://reviews.llvm.org/D153960 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D153960: [clang][dataflow] Don't crash when creating pointers to members.

2023-06-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 rG1d7f9ce61f6e: [clang][dataflow] Don't crash when creating pointers to members. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES

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

2023-03-30 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. These methods provide a less verbose way of allo

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

2023-03-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 deduplicated code is moved into initVars().

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

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

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

2023-04-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 510413. mboehme marked 2 inline comments as done. mboehme added a comment. Rename function again to be consistent with `getFieldsAndGlobalVars()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147326/new/ https

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

2023-04-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:465 + /// referenced in `FuncDecl`. `FuncDecl` must have a body. + void initVars(const FunctionDecl *FuncDecl); ymandel wrote: > xazax.hun wrote: > > I

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

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

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

2023-04-03 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/DataflowAnalysisContext.h:100 +// used `StorageLocation` subclasses and make them use a `BumpPtrAllocator`. +Locs.push_back(std::make_unique(s

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

2023-04-03 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce0ab9d11cec: [clang][dataflow][NFC] Share code between Environment ctor and pushCallInternal… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

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

2023-04-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 510496. 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/D147302/new/ https://reviews.llvm.org/D147302 File

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

2023-04-03 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/DataflowAnalysisContext.h:215 /// Creates an atomic boolean value. - AtomicBoolValue &createAtomicBoolValue() { -return takeOwnership(std::make

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

2023-04-04 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 rG745a957f9dc5: [clang][dataflow] Add `create()` methods to `Environment` and… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D147601: [clang][dataflow] Eliminate code duplication in Environment::createValueUnlessSelfReferential().

2023-04-05 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] D147603: [clang][dataflow] Use `isRecordType()` where appropriate.

2023-04-05 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 is less verbose than checking for class, st

[PATCH] D147601: [clang][dataflow] Eliminate code duplication in Environment::createValueUnlessSelfReferential().

2023-04-05 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Failing premerge check in CodeGen looks unrelated (this patch doesn't affect CodeGen in any way). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147601/new/ https://reviews.llvm.org/D147601

[PATCH] D147601: [clang][dataflow] Eliminate code duplication in Environment::createValueUnlessSelfReferential().

2023-04-06 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 rG3c8ead2662ac: [clang][dataflow] Eliminate code duplication in Environment… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D147603: [clang][dataflow] Use `isRecordType()` where appropriate.

2023-04-06 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Failing CodeGen test in premerge check appears to be a pre-existing failure. (I'm not touching anything related to CodeGen here.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147603/new/ https://reviews.llvm.org/D147603

[PATCH] D147603: [clang][dataflow] Use `isRecordType()` where appropriate.

2023-04-06 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 rGeffdfa7d5f49: [clang][dataflow] Use `isRecordType()` where appropriate. (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D147698: [clang][dataflow] Add support for new and delete expressions.

2023-04-06 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. To model the fact that values get deleted by a d

[PATCH] D148004: [clang][dataflow][NFC] Remove unused parameter from `insertIfGlobal()`.

2023-04-11 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] D148006: [clang][dataflow] Associate `FunctionToPointerDecay` nodes with a value.

2023-04-11 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. To ensure that we have a pointee for the `Pointe

[PATCH] D147698: [clang][dataflow] Add support for new and delete expressions.

2023-04-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. @gribozavr2 Just to make sure I understand you correctly here (before I make any changes to the code): IIUC you recommend simply doing nothing on a delete expression? (Your arguments for this make sense to me, just want to double-check I understood correctly.) Reposit

[PATCH] D148004: [clang][dataflow][NFC] Remove unused parameter from `insertIfGlobal()`.

2023-04-11 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG991c7e11728f: [clang][dataflow][NFC] Remove unused parameter from `insertIfGlobal()`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

[PATCH] D147989: [clang] Fix Attribute Placement

2023-04-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D147989#4257539 , @samtebbs wrote: > Looping in some people who have worked on and reviewed patches in this area > for some experienced eyes. Nothing else to add beyond what @aaron.ballman has noted. Thanks for working on th

[PATCH] D147698: [clang][dataflow] Add support for new and delete expressions.

2023-04-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 512434. mboehme added a comment. Eliminate specific handling of delete expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147698/new/ https://reviews.llvm.org/D147698 Files: clang/lib/Analysis/FlowSe

[PATCH] D147698: [clang][dataflow] Add support for new expressions.

2023-04-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Value.h:315 + /// `D` must currently be associated with a value. + void unsetChild(const ValueDecl &D) { +auto It = Children.find(&D); --

[PATCH] D148110: [clang-tidy] Ctor arguments are sequenced if ctor call is written as list-initialization.

2023-04-12 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. See https://ti

[PATCH] D148110: [clang-tidy] Ctor arguments are sequenced if ctor call is written as list-initialization.

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

[PATCH] D148110: [clang-tidy] Ctor arguments are sequenced if ctor call is written as list-initialization.

2023-04-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp:1163 +namespace { + njames93 wrote: > Whats with this namespace addition? looks unnecessary and should b

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

2023-04-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 514182. mboehme added a comment. Changes in reponse 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/bugprone

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

2023-04-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 514188. 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/bugprone

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

2023-04-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. 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. Did I do this correctly

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

2023-05-21 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:789 - // of these accessors. - .CaseOfCFGStmt(valueOperatorCall(std::nullopt),

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

2023-05-21 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 an inline comment as done. Closed by commit rG5a16665ed535: [clang][dataflow] Use `Strict` accessors in more places in Transfer.cpp. (authored by mboehme

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

2023-05-21 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 an inline comment as done. Closed by commit rG8bc8fc65c9b2: [clang][dataflow] Use `Strict` accessors in TypeErasedDataflowAnalysis.cpp. (authored by mboe

[PATCH] D150657: [clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp.

2023-05-21 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 an inline comment as done. Closed by commit rG96b22e1c378a: [clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp. (authored by mboehme). Rep

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

2023-05-21 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 an inline comment as done. Closed by commit rG3bc1ea5b0ac9: [clang][dataflow] Fix a bug in handling of `operator->` for optional checker. (authored by mb

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

2023-05-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 crash was due to unconditionally calling `Bl

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

2023-05-22 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa9e90f799422: [clang][dataflow] Fix a null pointer crash in `computeBlockInputState()`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D151183: [clang][dataflow] Add a `ControlFlowContext::build()` overload taking a `FunctionDecl`.

2023-05-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. This is the most common use case, so it makes se

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

2023-05-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. This patch changes the way `Environment::ReturnL

[PATCH] D151201: [clang][dataflow] Fix a crash in `getLogicOperatorSubExprValue()`.

2023-05-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. This patch adds a test that crashes without the

[PATCH] D150776: [clang][dataflow] Use `Strict` accessors in comma operator and no-op cast.

2023-05-23 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG68baaca61dfa: [clang][dataflow] Use `Strict` accessors in comma operator and no-op cast. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D151183: [clang][dataflow] Add a `ControlFlowContext::build()` overload taking a `FunctionDecl`.

2023-05-25 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:39 + /// Builds a ControlFlowContext from an AST node. `D` is the function in which /// `S` resides. `D.isTemplated()` must

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

2023-05-25 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/DataflowEnvironment.h:196 + void popCall(const CallExpr *Call, const Environment &CalleeEnv); + void popCall(const CXXConstructExpr *Call, const Envir

[PATCH] D151183: [clang][dataflow] Add a `ControlFlowContext::build()` overload taking a `FunctionDecl`.

2023-05-25 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 rG246626a8cfd3: [clang][dataflow] Add a `ControlFlowContext::build()` overload taking a… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2023-05-25 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 rG64413584dacb: [clang][dataflow] Add support for return values of reference type. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D151201: [clang][dataflow] Fix a crash in `getLogicOperatorSubExprValue()`.

2023-05-25 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 525501. mboehme added a comment. Add check that the value of the expression is true. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151201/new/ https://reviews.llvm.org/D151201 Files: clang/lib/Analysis/FlowS

[PATCH] D151201: [clang][dataflow] Fix a crash in `getLogicOperatorSubExprValue()`.

2023-05-25 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:5064 +bool target() { + return true || false || false || false; +} xazax.hun wrote: > Should we also test tha

[PATCH] D151430: [clang][dataflow][NFC] Remove unused variable.

2023-05-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. Thanks to chapuni to pointing this out on https://reviews.llvm.org/D151183.

[PATCH] D151430: [clang][dataflow][NFC] Remove unused variable.

2023-05-25 Thread Martin Böhme via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG49946df8211e: [clang][dataflow][NFC] Remove unused variable. (auth

[PATCH] D151183: [clang][dataflow] Add a `ControlFlowContext::build()` overload taking a `FunctionDecl`.

2023-05-25 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/TypeErasedDataflowAnalysisTest.cpp:71 - auto CFCtx = llvm::cantFail( - ControlFlowContext::build(*Func, *Body, AST->getASTContext()));

[PATCH] D151201: [clang][dataflow] Fix a crash in `getLogicOperatorSubExprValue()`.

2023-05-25 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 rG7f6c3a9033b6: [clang][dataflow] Fix a crash in `getLogicOperatorSubExprValue()`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D151549: [clang][dataflow] Remove unnecessary `ASTContext` parameter from `ControlFlowContext::build` overload.

2023-05-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. When introducing this new overload in https://re

[PATCH] D151549: [clang][dataflow] Remove unnecessary `ASTContext` parameter from `ControlFlowContext::build` overload.

2023-05-30 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 rG5ddb623952ca: [clang][dataflow] Remove unnecessary `ASTContext` parameter from… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGE

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

2023-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:329 +static void +builtinTransferScopeEnd(const CFGScopeEnd &Elt, +TypeErasedDataflowAnalysisState &InputState) { xazax.hun wrote: >

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

2023-05-04 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbfbe13788815: [clang][dataflow] Eliminate intermediate `ReferenceValue`s from `Environment… (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D149144?vs=519373&id=519644#toc Repo

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

2023-05-07 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:329 +static void +builtinTransferScopeEnd(const CFGScopeEnd &Elt, +TypeErasedDataflowAnalysisState &InputState) { xazax.hun wrote: >

cfe-commits@lists.llvm.org

2023-05-08 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9940fac75395: [clang][dataflow][NFC] Remove `SkipPast` parameter from `getStorageLocation… (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D149151?vs=516770&id=520281#toc Repos

cfe-commits@lists.llvm.org

2023-05-08 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 parameter was already a no-op, so removing

cfe-commits@lists.llvm.org

2023-05-09 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0c852dc88e92: [clang][dataflow][NFC] Remove `SkipPast` param from `getValue(const ValueDecl… (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-11 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. Attempting to analyze templated code doesn't hav

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

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

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

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

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-12 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:36 + /// `S` resides. `D.isTemplated()` must be false. + static llvm::Expected build(const Decl &D, Stmt &S, +

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

2023-05-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 521607. mboehme added a comment. Eliminate unnecessary `else`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149838/new/ https://reviews.llvm.org/D149838 Files: clang/include/clang/Analysis/FlowSensitive/Dat

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

2023-05-12 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/DataflowEnvironment.cpp:840 +return nullptr; + } else { +return cast(Loc); ymandel wrote: > nit: no need for `else` since `if` branch al

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522036. mboehme marked an inline comment as done. mboehme added a comment. Eliminate warning for use of deprecated function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150352/new/ https://reviews.llvm.org/D15

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

2023-05-14 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 rG48bc71505e03: [clang][dataflow] Eliminate `SkipPast::ReferenceThenPointer`. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522040. mboehme added a comment. Eliminate warnings for calling deprecated functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150352/new/ https://reviews.llvm.org/D150352 Files: clang/include/clang/Anal

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-15 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522075. mboehme added a comment. Set `-fnodelayed-template-parsing` again. This is needed to make tests pass on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150352/new/ https://reviews.llvm.org/D1503

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-15 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:2537 -TEST(TransferTest, DerefDependentPtr) { std::string Code = R"( mboehme wrote: > gribozavr2 wrote: > > This `DerefDependentPtr` test was originally added

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-15 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522096. mboehme added a comment. Spell `-fno-delayed-template-parsing` correctly (it was missing a hyphen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150352/new/ https://reviews.llvm.org/D150352 Files: c

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-15 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1a42f795587b: [clang][dataflow] Don't analyze templated declarations. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150352/new/ https

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-15 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a subscriber: amyk. mboehme added a comment. In D150352#4342480 , @uabelho wrote: > Hello, > > > ../../clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:43:27: > error: 'build' is deprecated: Use the version that tak

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

2023-05-16 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 is part of the gradual migration to strict

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

2023-05-16 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 patch handles the straightforward cases. Up

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

2023-05-16 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 patch is part of the ongoing migration to s

[PATCH] D150657: [clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp.

2023-05-16 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 patch is part of the ongoing migration to strict handling of value catego

[PATCH] D150657: [clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp.

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522554. mboehme added a comment. Added a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150657/new/ https://reviews.llvm.org/D150657 Files: clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp

[PATCH] D150657: [clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp.

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp:240 +// Returns the `Value` associated with `E` (which may be either a prvalue or +// glvalue). Creates a `Value` or `StorageLocation` as needed if `E` does not --

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

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:138 +static void forwardValue(const Expr &From, const Expr &To, Environment &Env) { + if (auto *Val = Env.getValueStrict(From)) sammccall wrote: > the name "forward" isn't

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

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:138 +static void forwardValue(const Expr &From, const Expr &To, Environment &Env) { + if (auto *Val = Env.getValueStrict(From)) ymandel wrote: > mboehme wrote: > > sammcca

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

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522583. mboehme added a comment. Simplified `else { if {} }` to `else if {}`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150655/new/ https://reviews.llvm.org/D150655 Files: clang/lib/Analysis/FlowSensitiv

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

2023-05-16 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:751-752 +Env.setValue(Loc, *Val); +} else { + if (Value *Val = Env.createValue(S->getType())) +Env.setValueStrict(*S, *Val);

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

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

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

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 522591. mboehme added a comment. Tweaked preconditions (in comments and code) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150653/new/ https://reviews.llvm.org/D150653 Files: clang/include/clang/Analysis/Fl

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

2023-05-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added a comment. In D150653#4345771 , @ymandel wrote: > I'm a little confused by one of the points in the description: > >> `setValueStrict()`: The RFC proposes that this should always create the same >>

[PATCH] D150756: [clang][dataflow] Remove unused parameter from `diagnoseUnwrapCall()`.

2023-05-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. Repository: rG LLVM Github Monorepo https://r

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

2023-05-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added a comment. Failing x64 debian build is due to a wrong CMake version, which is unrelated to this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150653/new/ https://reviews.llvm.org/D1506

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

2023-05-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 rG080ee850c639: [clang][dataflow] Add `Strict` versions of `Value` and `StorageLocation`… (authored by mboehme). Repository: rG LLVM Github Monorepo

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

2023-05-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 523031. mboehme added a comment. Renamed `forward...` functions to `propagate...`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150655/new/ https://reviews.llvm.org/D150655 Files: clang/lib/Analysis/FlowSen

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

2023-05-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 523032. mboehme added a comment. Applied suggested edit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150656/new/ https://reviews.llvm.org/D150656 Files: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowA

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

2023-05-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. Prior to this patch, `operator->` was being hand

[PATCH] D150776: [clang][dataflow] Use `Strict` accessors in comma operator and no-op cast.

2023-05-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. This patch is part of the ongoing migration to s

<    1   2   3   4   5   6   >