This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Make ODR error handling configurable
ClosedPublic

Authored by gamesh411 on Mar 4 2019, 5:34 AM.

Details

Summary

ODR errors are not necessarily true errors during the import of ASTs.
ASTMerge and CrossTU should use the warning equivalent of every CTU error,
while Sema should emit errors as before.

Diff Detail

Event Timeline

gamesh411 created this revision.Mar 4 2019, 5:34 AM

This revision is the alternative of the abandoned D55646.
Now Sema uses the old behavior of emitting ODR errors while merging and importing is done in a more lenient way.

gamesh411 retitled this revision from Make ODR error handling configurable to [ASTImporter] Make ODR error handling configurable.Mar 7 2019, 8:58 AM

Hi Gabor,
This patch LGTM mostly, but there is a comment inline.

include/clang/AST/ASTStructuralEquivalence.h
81

I see the argument order change but I don't see any callers changed. Do we really need this order change?

gamesh411 updated this revision to Diff 192070.Mar 25 2019, 4:09 AM
gamesh411 marked an inline comment as done.
  • Revert member order to original
include/clang/AST/ASTStructuralEquivalence.h
81

Strictly speaking, there is no need for this change, the constructor param order does not match the initialization, but that is just a nit. I have updated the diff. Cheers :)

a_sidorin accepted this revision.Mar 28 2019, 3:51 PM
This revision is now accepted and ready to land.Mar 28 2019, 3:51 PM
This revision was automatically updated to reflect the committed changes.