[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456305. wyt marked 5 inline comments as done. wyt added a comment. Address comments: add const qualifiers where applicable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132147/new/ https://reviews.llvm.org/D132147

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456307. wyt marked an inline comment as done. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132377/new/ https://reviews.llvm.org/D132377 Files: clang/unit

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:88 +/// Arguments for building the dataflow analysis. +template struct AnalysisInputs { + /// Input code that is analyzed. sgatev wrote: > Why move this? It makes it

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456308. wyt marked 6 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132763/new/ https://reviews.llvm.org/D132763 Files: clang/unittests/Analysis/Flo

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:363-365 +std::sort(AnnotationStatesAsVector.begin(), + AnnotationStatesAsVector.end(), + [](auto a, auto b) { return a.first < b.first; }); ---

[PATCH] D132745: [clang] Fix ambiguous use of `report_fatal_error`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456311. wyt marked an inline comment as done. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132745/new/ https://reviews.llvm.org/D132745 Files: clang/lib/Basic/SanitizerSpec

[PATCH] D132756: [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of the deprecated overload of `checkDataflow`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456317. wyt marked 2 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132756/new/ https://reviews.llvm.org/D132756 Files: clang/unittests/Analysis/Flo

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456323. wyt marked an inline comment as done. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132763/new/ https://reviews.llvm.org/D132763 Files: clang/unittests/Analysis/Flow

[PATCH] D132745: [clang] Fix ambiguous use of `report_fatal_error`.

2022-08-29 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd346eb7bf08c: [clang] Fix ambiguous use of `report_fatal_error`. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132745/new/ https://review

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456624. wyt added a comment. Replace use of virtual functions with sfinea and CRTP to call transfer functions defined by the user. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456699. wyt marked an inline comment as done. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132377/new/ https://reviews.llvm.org/D132377 Files: clang/unittests/Analysis/Flow

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:191 + AnalysisOutputs AO{AnnotatedCode, Context, Target, CFCtx, + Analysis, InitEnv, {}}; + if (AI.SetupTest) { ymandel wrote: > formatting s

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-30 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:652 ASTContext &ASTCtx) { -ASSERT_THAT(Results, ElementsAre(Pair("p4", _), Pair("p3", _), - Pair("p2", _), Pair("p1", _))

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-31 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9e842dd4bd55: [clang][dataflow] Extend transfer functions for other `CFGElement`s (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456978. wyt added a comment. Herald added subscribers: llvm-commits, mgrang, mgorny. Herald added a project: LLVM. Remove use of designated initializers which are only allowed on C++20. Instead, introduce a constructor that sets required fields, and `withFieldNam

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456980. wyt added a comment. This is a re-update of a previous update which uploaded the wrong diff. Remove use of designated initializers which are only allowed on C++20. Instead, introduce a constructor that sets required fields, and withFieldName methods that

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456982. wyt added a comment. Update according to change in parent patch to replace designated initialisers when constructing `AnalysisInputs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132377/new/ https://revi

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456983. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132763/new/ https://reviews.llvm.org/D132763 Files: clang/unittests/Analysis/FlowSensitive/TestingSu

[PATCH] D132756: [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of the deprecated overload of `checkDataflow`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456986. wyt added a comment. Update according to change in preceding patches to replace use of designated initialisers when constructing `AnalysisInputs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132756/new/

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc9033eeb2e59: [clang][dataflow] Generalise match switch utility to other AST types and add a… (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-31 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 457052. wyt added a comment. Use `u` suffix to declare constants as unsigned in `CFGMatchSwitchTest.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/i

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-09-01 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd931ac9e27ca: [clang][dataflow] Generalise match switch utility to other AST types and add a… (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D132756: [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of the deprecated overload of `checkDataflow`.

2022-09-01 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 457231. wyt added a comment. Update build target dependency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132756/new/ https://reviews.llvm.org/D132756 Files: clang/unittests/Analysis/FlowSensitive/TestingSuppor

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-09-01 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb898d43b08e: [clang][dataflow] Refactor `TestingSupport.h` (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132147/new/ https://reviews.llv

[PATCH] D132377: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`.

2022-09-01 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5a4aece76de7: [clang][dataflow] Add `SetupTest` parameter for `AnalysisInputs`. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132377/new/

[PATCH] D132763: [clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector>`.

2022-09-01 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8dd14c427ae5: [clang][dataflow] Use `StringMap` for storing analysis states at annotated… (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D132756: [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of the deprecated overload of `checkDataflow`.

2022-09-01 Thread weiyi 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 rG14757d5b845b: [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of… (authored by wyt). Repository: rG LLVM Github Monore

[PATCH] D133930: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D133931: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `clang/Analysis/FlowSensitive`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D133933: [clang][dataflow] Modify `transfer` in `DataflowModel` to take `CFGElement` as input instead of `Stmt`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. To keep API of transfer functions consistent. The singl

[PATCH] D133935: [clang][dataflow] Refactor `clang/Analysis/FlowSensitive/MatchSwitchTest.cpp`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Remove use of `runDataflowAnalysis` to keep test isolated. - Add test for `ASTMatchS

[PATCH] D133930: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460366. wyt marked an inline comment as done. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133930/new/ https://reviews.llvm.org/D133930 Files: clang/include/clang/Analysis

[PATCH] D133933: [clang][dataflow] Modify `transfer` in `DataflowModel` to take `CFGElement` as input instead of `Stmt`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460368. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133933/new/ https://reviews.llvm.org/D133933 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h cla

[PATCH] D133935: [clang][dataflow] Refactor `clang/Analysis/FlowSensitive/MatchSwitchTest.cpp`.

2022-09-15 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460371. wyt added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133935/new/ https://reviews.llvm.org/D133935 Files: clang/unittests/Analysis/FlowSensitive/MatchSwitchTest.cpp Index:

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440119. wyt marked an inline comment as done. wyt added a comment. Address comments - add example to `buildAndSubstituteFlowCondition` doc comment, add tests for atomic and negated flow condition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128359: [clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`.

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440123. wyt marked an inline comment as done. wyt added a comment. Fix comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128359/new/ https://reviews.llvm.org/D128359 Files: clang/include/clang/Analysis/Flow

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440162. wyt marked 2 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128056/new/ https://reviews.llvm.org/D128056 Files: clang/include/clang/Analysis

[PATCH] D128659: [clang][dataflow] Add `buildAndSubstituteFlowCondition` to `DataflowEnvironment`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends On D128658 Repository: rG LLV

[PATCH] D128658: [clang][dataflow] Ensure atomic boolean values representing true and false are not replaced in `buildAndSubstituteFlowCondition`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D128658 Fil

[PATCH] D128658: [clang][dataflow] Ensure atomic boolean values representing true and false are not replaced in `buildAndSubstituteFlowCondition`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440304. wyt added a comment. Assert that user does not try to substitute true/false booleans. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128658/new/ https://reviews.llvm.org/D128658 Files: clang/lib/Analysis/

[PATCH] D128659: [clang][dataflow] Add `buildAndSubstituteFlowCondition` to `DataflowEnvironment`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440305. wyt added a comment. Fix comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128659/new/ https://reviews.llvm.org/D128659 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h clan

[PATCH] D128658: [clang][dataflow] Do not allow substitution of true/false boolean literals in `buildAndSubstituteFlowCondition`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440333. wyt added a comment. Add macro for only testing asserts in debug mode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128658/new/ https://reviews.llvm.org/D128658 Files: clang/lib/Analysis/FlowSensitive/D

[PATCH] D128659: [clang][dataflow] Add `buildAndSubstituteFlowCondition` to `DataflowEnvironment`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440336. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128659/new/ https://reviews.llvm.org/D128659 Files: clang/include/clang/Analysis/FlowSensitive/Dataf

[PATCH] D128658: [clang][dataflow] Do not allow substitution of true/false boolean literals in `buildAndSubstituteFlowCondition`

2022-06-27 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 440341. wyt added a comment. Add assert message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128658/new/ https://reviews.llvm.org/D128658 Files: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp c

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-06 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https:/

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442824. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442825. wyt marked 3 inline comments as done. wyt added a comment. Typo fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clang/include/clang/Analysis/FlowSen

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442828. wyt added a comment. Make scope resolution consistent (Solver:: instead of WatchedLiteralsSolver::). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clan

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442840. wyt marked 3 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clang/include/clang/Analysis

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442845. wyt added a comment. Fix comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442848. wyt added a comment. Replace std::optional with llvm::Optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clang/include/clang/Analysis/FlowSensitive

[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 442874. wyt added a comment. Remove decomposing declarations which are not available in llvm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129180/new/ https://reviews.llvm.org/D129180 Files: clang/include/clang

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https:/

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 449664. wyt added a comment. Update DeclCtx when pushing/popping calls. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis/FlowSensitiv

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 449666. wyt marked 3 inline comments as done. wyt added a comment. Formatting fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-03 Thread weiyi via Phabricator via cfe-commits
wyt added a reviewer: samestep. wyt removed a subscriber: samestep. wyt added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:170-172 + const DeclContext &DeclCtxArg) : Environment(DACtx) { + DeclCtx = &DeclCtxAr

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-05 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 450276. wyt marked an inline comment as done. wyt added a comment. Rebase to head. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis/F

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-10 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 451411. wyt added a comment. Relocate function and fix comment for consistency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis/Flow

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-10 Thread weiyi 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 rG8a4c40bfe8e6: [clang][dataflow] Store DeclContext of block being analysed in Environment if… (authored by wyt). Repository: rG LLVM Github Monorep

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-10 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-10 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends On D131614

[PATCH] D129546: [clang][dataflow] Refactor boolean creation as a test utility.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D129546 Fil

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun, mgorny. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Depends On D129546 <

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, mgrang, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends On D129547

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443868. wyt added a comment. Update CMakeList for DebugSupportTest.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/new/ https://reviews.llvm.org/D129547 Files: clang/docs/tools/clang-formatted-files.txt

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443905. wyt added a comment. Extract recursion into boolean subvalues into separate statements to enforce order of evaluation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/new/ https://reviews.llvm.org/D12

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443914. wyt added a comment. Minor fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/new/ https://reviews.llvm.org/D129547 Files: clang/docs/tools/clang-formatted-files.txt clang/include/clang/Analys

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443917. wyt added a comment. Use std::vector as input to `debugString` to maintain order stability of boolean constraints to enable testing. `debugString` which takes a `llvm::DenseSet` is now a wrapper around the logic applied to std::vector. Repository: r

[PATCH] D129546: [clang][dataflow] Refactor boolean creation as a test utility.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443938. wyt marked 2 inline comments as done. wyt added a comment. Address comments on renaming. Removed test fixture class, replacing TEST_F with TEST. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129546/new/ ht

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443940. wyt marked 10 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/new/ https://reviews.llvm.org/D129547 Files: clang/docs/tools/clang-form

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443941. wyt marked 2 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129548/new/ https://reviews.llvm.org/D129548 Files: clang/include/clang/Analysis

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443947. wyt added a comment. Fix comment, remove unused import. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129548/new/ https://reviews.llvm.org/D129548 Files: clang/include/clang/Analysis/FlowSensitive/DebugS

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443968. wyt added a comment. Fix use after move. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/new/ https://reviews.llvm.org/D129547 Files: clang/docs/tools/clang-formatted-files.txt clang/include/clang

[PATCH] D129568: [clang][dataflow] Rename `Status` field in a `Solver::Result` struct to `SATCheckStatus`.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, `Status` was named after the enum

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443971. wyt added a comment. Remove unnecessary enum keyword. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129548/new/ https://reviews.llvm.org/D129548 Files: clang/include/clang/Analysis/FlowSensitive/DebugSup

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443982. wyt added a comment. Move `DebugStringGenerator` class into anonymous namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/new/ https://reviews.llvm.org/D129547 Files: clang/docs/tools/clang-f

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 443983. wyt added a comment. Change propagated from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129548/new/ https://reviews.llvm.org/D129548 Files: clang/include/clang/Analysis/FlowSensitive/Debu

[PATCH] D129546: [clang][dataflow] Refactor boolean creation as a test utility.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 444026. wyt marked an inline comment as done. wyt added a comment. Address comments: add used import, remove unused imports. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129546/new/ https://reviews.llvm.org/D12954

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 444029. wyt marked an inline comment as done. wyt added a comment. Address comment on renaming parameter. Add const qualifier to BoolValue input to debugString. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129547/

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 444030. wyt marked 3 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129548/new/ https://reviews.llvm.org/D129548 Files: clang/include/clang/Analysis

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt added a comment. Comment at: clang/lib/Analysis/FlowSensitive/DebugSupport.cpp:119-133 +std::vector> LinesData; +for (auto &AtomAssignment : AtomAssignments) { + auto Name = getAtomName(AtomAssignment.first); + MaxNameLength = std::max(MaxNameLength, Name

[PATCH] D129546: [clang][dataflow] Refactor boolean creation as a test utility.

2022-07-12 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 444031. wyt added a comment. Removed unused imports in SolverTest.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129546/new/ https://reviews.llvm.org/D129546 Files: clang/unittests/Analysis/FlowSensitive/Solv

[PATCH] D129546: [clang][dataflow] Refactor boolean creation as a test utility.

2022-07-13 Thread weiyi 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 rG632de855a042: [clang][dataflow] Refactor boolean creation as a test utility. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D129547: [clang][dataflow] Generate readable form of boolean values for debugging purposes.

2022-07-13 Thread weiyi 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 rGc9666d2339e5: [clang][dataflow] Generate readable form of boolean values. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D129568: [clang][dataflow] Rename `Status` field in a `Solver::Result` struct to `SATCheckStatus`.

2022-07-13 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ec2b2f4ec32: [clang][dataflow] Rename `Status` field in a `Solver::Result` struct to… (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12956

[PATCH] D129548: [clang][dataflow] Generate readable form of input and output of satisfiability checking for debugging purposes.

2022-07-13 Thread weiyi 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 rGb8d83e8004e4: [clang][dataflow] Generate readable form of input and output of satisfiability… (authored by wyt). Repository: rG LLVM Github Monore

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-11 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 451754. wyt added a comment. Initialise DeclCtx field with nullptr. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files: clang/include/clang/Analysis/FlowSensitive/Da

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-11 Thread weiyi 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 rG2cb51449f0d9: [clang][dataflow] Store DeclContext of block being analysed in Environment if… (authored by wyt). Repository: rG LLVM Github Monorep

[PATCH] D131891: [clang][dataflow] Debug string for value kinds.

2022-08-15 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452957. wyt marked 9 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org/D131614 Files: clang/include/clang/Analysis

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452958. wyt added a comment. Herald added a subscriber: mgorny. Move implementation to CFGMatchSwitch.h, add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files:

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452964. wyt added a comment. Add FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org/D131614 Files: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h clang/inc

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452965. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/include/clang/Analysis/FlowSensitive/CFGMa

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt added a reviewer: xazax.hun. wyt added inline comments. Herald added a subscriber: rnkovacs. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:103 + virtual void transferCFGElement(const CFGElement *Element, Lattice &L, +

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452966. wyt added a comment. Fix incorrect change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/include/clang/Analysis/FlowSensitive/CFGMatchSwitch.h

[PATCH] D131891: [clang][dataflow] Debug string for value kinds.

2022-08-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 452968. wyt added a comment. Use llvm::StringRef for returning static strings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131891/new/ https://reviews.llvm.org/D131891 Files: clang/include/clang/Analysis/FlowS

[PATCH] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-18 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 453702. wyt marked 2 inline comments as done. wyt added a comment. Address comments. Unable to rename `check/runDataflowOnCFG` to `check/runDataflow` currently due to ambiguous use. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-18 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 453704. wyt marked 5 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files: clang/include/clang/Analysis

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-18 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add `AnalysisArguments` struct for `checkDataflow`. - Remove compulsory binding fro

[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

2022-08-18 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 453708. wyt added a comment. Small fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132147/new/ https://reviews.llvm.org/D132147 Files: clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp clang/unitt

  1   2   >