This is an archive of the discontinued LLVM Phabricator instance.

[-Wunsafe-buffer-usage][NFC] Refactor checkUnsafeBufferUsage
ClosedPublic

Authored by jkorous on Jan 9 2023, 4:28 PM.

Diff Detail

Event Timeline

jkorous created this revision.Jan 9 2023, 4:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2023, 4:28 PM
jkorous requested review of this revision.Jan 9 2023, 4:28 PM
NoQ added a comment.Jan 10 2023, 6:11 PM

I like this, this is much easier to work with than my original speculative spaghetti!

clang/lib/Analysis/UnsafeBufferUsage.cpp
578–579

Maybe move unique_ptrs out of the original vector straight into the new location, and drop the original vector entirely, instead of dealing with raw pointers?

jkorous marked an inline comment as done.Jan 11 2023, 2:30 PM
jkorous updated this revision to Diff 488387.Jan 11 2023, 2:32 PM
  • made WarningGadgetSets and FixableGadgetSets own the gadgets
  • changed temporary function parameter name StrategyForDirectlyUnsafeVariables to S
NoQ accepted this revision.Jan 17 2023, 2:54 PM

Aha looks great!

This revision is now accepted and ready to land.Jan 17 2023, 2:54 PM
This revision was landed with ongoing or failed builds.Jan 17 2023, 6:01 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 6:01 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript