This is an archive of the discontinued LLVM Phabricator instance.

Module: correctly set the module file kind when emitting diagnostics for file_modified
ClosedPublic

Authored by manmanren on Oct 19 2016, 5:05 PM.

Details

Summary

I don't quite like the if statement in the patch, but given that ASTReader::Error and DelayedDiagnostic only take strings, it is hard to just change err_fe_pch_file_modified to take a %select that depends on an integer.

On the other hard, it seems impossible to have another diagnostics in flight when emitting err_fe_pch_file_modified. Is it okay to just use Diag instead of Error?

Unfortunately I was not able to come up with a test that outputs this diagnostics for a module file.

Diff Detail

Repository
rL LLVM

Event Timeline

manmanren updated this revision to Diff 75256.Oct 19 2016, 5:05 PM
manmanren retitled this revision from to Module: correctly set the module file kind when emitting diagnostics for file_modified.
manmanren updated this object.
manmanren added reviewers: bruno, rsmith, benlangmuir.
manmanren added a subscriber: cfe-commits.
manmanren updated this revision to Diff 75326.Oct 20 2016, 11:33 AM

Thanks Richard for the testing case. It is also obvious from the testing case that we can have another diagnostic in flight when emitting err_fe_pch_file_modified.

rsmith accepted this revision.Oct 20 2016, 1:54 PM
rsmith edited edge metadata.
This revision is now accepted and ready to land.Oct 20 2016, 1:54 PM
This revision was automatically updated to reflect the committed changes.