[PATCH] D134318: [clang][dataflow] Remove deprecated `transfer(const Stmt *, ...)` API.

2022-09-21 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG94747094c782: [clang][dataflow] Remove deprecated `transfer(const Stmt *, ...)` API. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134081: [clang][dataflow] Remove deprecated overloads of `checkDataflow` in `TestingSupport.h`.

2022-09-21 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 rG003566cb1fae: [clang][dataflow] Remove deprecated overloads of `checkDataflow` in… (authored by wyt). Repository: rG LLVM Github Monorepo

[PATCH] D134318: [clang][dataflow] Remove deprecated `transfer(const Stmt *, ...)` API.

2022-09-20 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

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

2022-09-19 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 rG88210b81eed8: [clang][dataflow] Refactor `clang/Analysis/FlowSensitive/MatchSwitchTest.cpp`. (authored by wyt). Changed prior to commit:

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

2022-09-19 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 rG41d52c5a7f7a: [clang][dataflow] Modify `transfer` in `DataflowModel` to take `CFGElement` as… (authored by wyt). Repository: rG LLVM Github

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

2022-09-19 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 rGcf94c52e35f2: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const… (authored by wyt). Changed prior to commit:

[PATCH] D133930: [clang][dataflow] Replace usage of deprecated functions with the optional check

2022-09-19 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7538b3604519: [clang][dataflow] Replace usage of deprecated functions with the optional check (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-09-16 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 460928. wyt added a comment. Herald added a subscriber: carlosgalvezp. Herald added a project: clang-tools-extra. Update UncheckedOptionalAccessCheck.cpp. Remove deprecated `runDataflowAnalysis`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134081: [clang][dataflow] Remove deprecated overloads of `checkDataflow` in `TestingSupport.h`.

2022-09-16 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, mgrang, 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/D134081

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

2022-09-16 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 rG41f235d26887: [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const… (authored by wyt). Repository: rG LLVM Github

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

2022-09-16 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:137-140 +auto CS = E->getAs(); +if (!CS) + return; +auto S = CS->getStmt(); martong wrote: > This is exactly the same code that

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

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

[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

[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

[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

[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

[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

[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

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

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

[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

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

[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

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

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

[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

[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

[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

[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 ) { -ASSERT_THAT(Results, ElementsAre(Pair("p4", _), Pair("p3", _), - Pair("p2", _), Pair("p1", _))); +

[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

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

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

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

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

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

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

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

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

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

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456049. wyt added a comment. Mark override for virtual transfer function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org/D131614 Files:

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt added a comment. @thakis Thanks for pointing that out, will revert and recommit - since it also ran into some build failures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131614/new/ https://reviews.llvm.org/D131614

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

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

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456032. wyt added a comment. Fix typo and indentation. 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

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, mgrang, 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 D132377 Repository: rG LLVM

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456030. 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:

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 456029. wyt marked 4 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132147/new/ https://reviews.llvm.org/D132147 Files:

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

2022-08-26 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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D132756 Files:

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

2022-08-26 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `report_fatal_error` is overloaded on `StringRef` and `Twine &`, therefore passing a `std::string` argument leads to ambiguity as

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

2022-08-23 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454869. wyt added a comment. Fix comments for consistency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 Files:

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

2022-08-23 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/CFGMatchSwitch.h:55 +MSActionT A) && { +std::move(std::move(StmtBuilder).template CaseOf(M, A)); +return std::move(*this); sgatev

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

2022-08-23 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454868. wyt marked 13 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:

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

2022-08-23 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454754. 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/D132377/new/ https://reviews.llvm.org/D132377 Files:

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

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

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

2022-08-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454535. wyt added a comment. Rebase. 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

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

2022-08-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454534. wyt added a comment. Rebase. 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] D131614: [clang][dataflow] Extend transfer functions for other `CFGElement`s

2022-08-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454532. wyt added a comment. Rebase. 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

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

2022-08-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454527. wyt added a comment. Herald added a reviewer: NoQ. 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:

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

2022-08-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454525. wyt added a comment. Propagate change from parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132147/new/ https://reviews.llvm.org/D132147 Files:

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

2022-08-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454523. wyt marked 8 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:

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

2022-08-22 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. Moves the work required for retrieving annotation states into the `SetupTest` and

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

2022-08-19 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:125 +std::pair>>> +getAnnotationStates(AnalysisData ) { + using StateT = DataflowAnalysisState; gribozavr2 wrote: > Could we capture the lattice elements in the

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

2022-08-19 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 454097. wyt marked 2 inline comments as done. wyt added a comment. Address comments: rename `AnalysisArguments` to `AnalysisInputs` and `AnalysisData` to `AnalysisOutputs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-08-19 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:144 llvm::Optional>>> -runDataflowAnalysis( +runDataflowAnalysisOnCFG( const ControlFlowContext , AnalysisT , gribozavr2 wrote: > Cannot be renamed

[PATCH] D132229: [clang][dataflow] Mark `getDeclCtx` function in dataflow `Environment` `const`.

2022-08-19 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb0befe3ac1ba: [clang][dataflow] Mark `getDeclCtx` function in dataflow `Environment` `const`. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-08-19 Thread weiyi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdbb95c2a851c: [clang][dataflow] Debug string for value kinds. (authored by wyt). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131891/new/

[PATCH] D132229: [clang][dataflow] Mark `getDeclCtx` function in dataflow `Environment` `const`.

2022-08-19 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

[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

[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

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

[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

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

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

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

[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

[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

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

[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

[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

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

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

[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

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

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

[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 ) : Environment(DACtx) { + DeclCtx =

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

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

[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

[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

[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

[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

[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

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

  1   2   >