This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Convert ODR diagnostics inside ASTImporter implementation
ClosedPublic

Authored by gamesh411 on Mar 25 2019, 4:19 AM.

Details

Summary

ASTStructuralEquivalence uses a flag to indicate whether ODR diagnostics
should be considered errors or warnings as module Sema is more strict than
ASTMerge. The implementation of ASTImporter should allso follow
along the same lines.

Diff Detail

Repository
rL LLVM

Event Timeline

gamesh411 created this revision.Mar 25 2019, 4:19 AM
Herald added a reviewer: shafik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

Hi!

During CTU analysis, not only StructuralEquivalence but the main implementation of ASTImporter can also emit ODR-related diagnostics. After some consideration, I have chosen not to make these dependent on a switch, as ASTImporter is not nearly as widely used as StructuralEquivalence (thru Sema), and it would also complicate the code unnecessarily.
What do you think?

Regards,
Endre

gamesh411 retitled this revision from [ASTImporter] Covert ODR diagnostics inside ASTImporter implementation to [ASTImporter] Convert ODR diagnostics inside ASTImporter implementation.Mar 25 2019, 2:01 PM
a_sidorin accepted this revision.Mar 28 2019, 4:29 PM

Yes, I think this is fine. Thanks!

This revision is now accepted and ready to land.Mar 28 2019, 4:29 PM
shafik accepted this revision.Mar 28 2019, 5:23 PM

LGTM

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2019, 8:28 AM