This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Replace usage of deprecated functions with the optional check
ClosedPublic

Authored by wyt on Sep 15 2022, 3:20 AM.

Details

Summary
  • Update transfer and diagnose to take const CFGElement * as input in Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.
  • Update clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp accordingly.
  • Rename runDataflowAnalysisOnCFG to runDataflowAnalysis and remove the deprecated runDataflowAnalysis (this was only used by the now updated optional check).

Diff Detail

Event Timeline

wyt created this revision.Sep 15 2022, 3:20 AM
Herald added a project: Restricted Project. · View Herald Transcript
wyt requested review of this revision.Sep 15 2022, 3:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 3:20 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sgatev accepted this revision.Sep 15 2022, 3:58 AM
sgatev added inline comments.
clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
76

Why not Ctx like above?

This revision is now accepted and ready to land.Sep 15 2022, 3:58 AM
wyt updated this revision to Diff 460366.Sep 15 2022, 4:33 AM
wyt marked an inline comment as done.

Address comment.

gribozavr2 accepted this revision.Sep 15 2022, 4:07 PM
This revision was landed with ongoing or failed builds.Sep 16 2022, 10:55 AM
This revision was automatically updated to reflect the committed changes.
wyt reopened this revision.Sep 16 2022, 11:19 AM
This revision is now accepted and ready to land.Sep 16 2022, 11:19 AM
wyt updated this revision to Diff 460928.Sep 16 2022, 3:15 PM

Update UncheckedOptionalAccessCheck.cpp.
Remove deprecated runDataflowAnalysis.

Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2022, 3:15 PM
wyt retitled this revision from [clang][dataflow] Replace `transfer(const Stmt *, ...)` with `transfer(const CFGElement *, ...)` in `Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel`. to [clang][dataflow] Replace usage of deprecated functions with the optional check.Sep 16 2022, 3:24 PM
wyt edited the summary of this revision. (Show Details)
gribozavr2 accepted this revision.Sep 16 2022, 4:54 PM