This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Expose DataflowAnalysisContext from DataflowEnvironment.
ClosedPublic

Authored by bazuzi on Apr 28 2023, 9:56 AM.

Details

Summary

This will eliminate the need for more pass-through APIs. Also replace pass-through usages with this exposure.

Diff Detail

Event Timeline

bazuzi created this revision.Apr 28 2023, 9:56 AM
Herald added a project: Restricted Project. · View Herald Transcript
bazuzi requested review of this revision.Apr 28 2023, 9:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 9:56 AM
ymandel edited reviewers, added: xazax.hun; removed: NoQ.Apr 28 2023, 9:59 AM
ymandel edited subscribers, added: NoQ; removed: xazax.hun.
ymandel accepted this revision.Apr 28 2023, 10:01 AM

Thanks and welcome! :)

This revision is now accepted and ready to land.Apr 28 2023, 10:01 AM

Thanks! Seems like you have commit access, Yitzie; could you commit this for me as "Samira Bazuzi <bazuzi@google.com>"?

Thanks! Seems like you have commit access, Yitzie; could you commit this for me as "Samira Bazuzi <bazuzi@google.com>"?

Sure. Let's wait til Gabor approves, but then I'll go ahead.

xazax.hun accepted this revision.Apr 28 2023, 12:08 PM
xazax.hun added inline comments.
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
190

Any reason for a comment as opposed to the deprecated attribute?

bazuzi added inline comments.May 1 2023, 7:32 AM
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
190

I couldn't tell exactly what the conventions were or whether all of the chained replacements could be used as the FIX very well.

If you can confirm that LLVM_DEPRECATED("DataflowAnalysisContext is now directly exposed.", "*getDataflowAnalysisContext().getOptions().Log"),
LLVM_DEPRECATED(..., "getDataflowAnalysisContext().arena"), etc. will provide useful fixes, happy to replace with those. Or with replacements just in the MSG and "" for FIX otherwise.

gribozavr2 accepted this revision.May 1 2023, 9:36 AM
xazax.hun added inline comments.May 1 2023, 12:17 PM
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
190

Unfortunately, I am also not 100% sure what is the convention. But I am OK with not providing a FIXIT here. I do not expect too many clients yet.

bazuzi updated this revision to Diff 518547.May 1 2023, 1:19 PM

Use LLVM_DEPRECATED in place of comments indicating deprecation.

bazuzi marked an inline comment as done.May 1 2023, 1:21 PM
xazax.hun accepted this revision.May 1 2023, 1:52 PM