This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG58fe7f9683a0: [clang][dataflow] Add API to separate analysis
from diagnosis (authored by samestep).
Repository:
rG LLVM Github Monorepo
CHANGES S
samestep updated this revision to Diff 441112.
samestep added a comment.
- Tidy AnalysisData struct and PostVisitStmt param
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/include/clang/An
samestep updated this revision to Diff 441084.
samestep added a comment.
- Merge branch 'main' into diagnose-api
- Fix minor nits
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/include/cl
samestep marked 9 inline comments as done.
samestep added a comment.
Fixed all the minor nits and responded to some comments.
Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:401
+ const TypeErasedDataflowAnalysisState &State
sgatev accepted this revision.
sgatev added inline comments.
Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:401
+ const TypeErasedDataflowAnalysisState &State) {
+PostVisitStmt(Stmt.getStmt(), State);
+ }
gribozavr2 accepted this revision.
gribozavr2 added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:78
+public:
+ UncheckedOptionalAccessDiagnosis(
+ ASTContext &AstContext, UncheckedOptionalAccessModelOptions O
xazax.hun accepted this revision.
xazax.hun added a comment.
Thanks, LGTM!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
___
cfe-commits mailing list
cfe-comm
ymandel added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h:126
+std::function
+PostVisitStmt = nullptr);
Please update comment to mention this new param (and that its optional)
=
samestep updated this revision to Diff 440687.
samestep added a comment.
- Implement Gábor's suggestion
- Merge branch 'main' into diagnose-api
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
cl
samestep updated this revision to Diff 440406.
samestep added a comment.
- Bring back Diagnosis.h
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/docs/tools/clang-formatted-files.txt
clan
samestep updated this revision to Diff 440211.
samestep added a comment.
- Merge branch 'main' into diagnose-api
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/include/clang/Analysis/Flow
samestep updated this revision to Diff 439878.
samestep added a comment.
- Merge branch 'main' into diagnose-api
- WIP
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/include/clang/Analysi
xazax.hun added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:85
+private:
+ ASTContext &Context;
+ MatchSwitch>>
samestep wrote:
> samestep wrote:
> > xazax.hun wrote:
> > > Do we expect this to
samestep marked an inline comment as done.
samestep added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:85
+private:
+ ASTContext &Context;
+ MatchSwitch>>
samestep wrote:
> xazax.hun wrote:
> > D
gribozavr2 added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:38-42
+llvm::DenseSet diagnoseCFG(
+const ControlFlowContext &CFCtx,
+std::vector> &BlockStates,
+const Environment &Env, TypeErasedDataflowAnalysis &Analysis,
+Di
samestep marked an inline comment as done.
samestep added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:38-42
+llvm::DenseSet diagnoseCFG(
+const ControlFlowContext &CFCtx,
+std::vector> &BlockStates,
+const Environment &Env, Type
xazax.hun added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:38-42
+llvm::DenseSet diagnoseCFG(
+const ControlFlowContext &CFCtx,
+std::vector> &BlockStates,
+const Environment &Env, TypeErasedDataflowAnalysis &Analysis,
+Dia
xazax.hun added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:38-42
+llvm::DenseSet diagnoseCFG(
+const ControlFlowContext &CFCtx,
+std::vector> &BlockStates,
+const Environment &Env, TypeErasedDataflowAnalysis &Analysis,
+Dia
gribozavr2 added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:38
+template
+llvm::DenseSet diagnoseCFG(
+const ControlFlowContext &CFCtx,
This function seems pretty general and not necessarily tied to diagnostics.
WDYT
samestep updated this revision to Diff 439411.
samestep added a comment.
- Remove unnecessary std::move
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/docs/tools/clang-formatted-files.txt
samestep added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:57
+ }
+ return std::move(Diags);
+}
sgatev wrote:
> Better to remove this and rely on NRVO?
> https://en.cppreference.com/w/cpp/language/copy_elision
Ah OK, I'm
sgatev accepted this revision.
sgatev added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:57
+ }
+ return std::move(Diags);
+}
Better to remove this and rely on NRVO?
https:
samestep updated this revision to Diff 439372.
samestep added a comment.
- Merge branch 'main' into diagnose-api
- Incorporate Gábor's suggestions
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
xazax.hun added inline comments.
Comment at:
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:546
+void diagnoseUnwrapCall(const Expr *UnwrapExpr, const Expr *ObjectExpr,
+DiagnoseState> &State) {
I think this sh
samestep added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76
+class UncheckedOptionalAccessDiagnosis {
+public:
samestep wrote:
> sgatev wrote:
> > samestep wrote:
> > > samestep wrote:
> > > >
samestep added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76
+class UncheckedOptionalAccessDiagnosis {
+public:
sgatev wrote:
> samestep wrote:
> > samestep wrote:
> > > sgatev wrote:
> > > > M
sgatev added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76
+class UncheckedOptionalAccessDiagnosis {
+public:
samestep wrote:
> samestep wrote:
> > sgatev wrote:
> > > Move this to a new Unchec
samestep marked an inline comment as not done.
samestep added inline comments.
Comment at:
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76
+class UncheckedOptionalAccessDiagnosis {
+public:
samestep wrote:
> sgatev wrote:
>
samestep updated this revision to Diff 439048.
samestep added a comment.
Try to fix the broken patch
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/docs/tools/clang-formatted-files.txt
c
samestep marked 4 inline comments as done.
samestep added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/MatchSwitch.h:49
+template struct DiagnoseState {
+ DiagnoseState(DiagsT &Diags, const Environment &Env)
+ : Diags(Diags), Env(Env) {}
samestep updated this revision to Diff 439045.
samestep added a comment.
Comment Diagnosis.h and add missing headers
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127898/new/
https://reviews.llvm.org/D127898
Files:
clang/include/clang/Analysis/F
sgatev added inline comments.
Comment at: clang/include/clang/Analysis/FlowSensitive/Diagnosis.h:26
+template
+using Diagnosis =
+std::function;
Let's add some documentation for `Diagnosis` and `diagnoseCFG`.
Comment at: clang/include/clan
32 matches
Mail list logo