This is an archive of the discontinued LLVM Phabricator instance.

[Remarks] Emit remarks for "auto-init" !annotations
ClosedPublic

Authored by thegameg on Feb 24 2021, 11:40 AM.

Details

Summary

Using the !annotation metadata, emit remarks pointing to code added by -ftrivial-auto-var-init that survived the optimizer.

Example:

auto-init.c:4:7: remark: Initialization inserted by -ftrivial-auto-var-init. [-Rpass-missed=annotation-remarks]
  int buf[1024];
      ^

The tests are testing various situations like calls/stores/other instructions, with debug locations, and extra debug information on purpose: more patches will come to improve the reporting to make it more user-friendly, and these tests will show how the reporting evolves.

Diff Detail

Event Timeline

thegameg created this revision.Feb 24 2021, 11:40 AM
thegameg requested review of this revision.Feb 24 2021, 11:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2021, 11:40 AM
paquette accepted this revision.Feb 24 2021, 3:30 PM

I think this looks reasonable. LGTM

This revision is now accepted and ready to land.Feb 24 2021, 3:30 PM
This revision was landed with ongoing or failed builds.Feb 25 2021, 3:14 PM
This revision was automatically updated to reflect the committed changes.