Preparing to use diagnostics about ODR hash mismatches outside of ASTReader.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Sorry for the huge amount of changes in ASTReader.cpp but most of them are indentation changes, so I hope it's not too bad. I've tried to minimize the changes unrelated to introducing ODRDiagsEmitter but if anybody has other ideas/requests, I'm totally willing to reduce the load on reviewers.
For these indentation changes, maybe it is a good idea to edit the .git-blame-ignore-revs files in the root path.
That is a good idea. I'm thinking about a different option: I make my change but keep ODRDiagsEmitter methods over-indented to preserve the old indentation. The code is moved to a different file in D128695 and I just format the entire file. This way the current change is easier to review (now and in git history) and the formatting is [eventually] correct. As for me, having good git blame is more important than having perfect formatting (proposed formatting will be still OK).
OK. Now I've reverted mostly to the old indentation, preserving some of the quirks. Hope it is easier to review now.
clang/lib/Serialization/ASTReader.cpp | ||
---|---|---|
9577–9584 | Hmm, I've tried removing the old one ASTReader::getOwningModuleNameForDiagnostic but some tests were failing. Now all the tests seem to be fine. I'll remove ASTReader::getOwningModuleNameForDiagnostic and we'll see if pre-commit tests are happy. | |
9725–9726 | Sure. I see your point that ODRDiagsEmitter is stateless regarding diagnoseMismatch methods, so repeating the same construction looks excessive and verbose. But if anybody later has any reasons to change that, it should be possible as ODRDiagsEmitter construction is cheap. |
clang/lib/Serialization/ASTReader.cpp | ||
---|---|---|
9193–9195 | At first I though this part was important for certain tests. But I guess I've messed up somewhere else. |
Thanks for the review! Sorry for not answering earlier, I was on vacation. Now I'll rebase the change and will test it again before committing.
At first I though this part was important for certain tests. But I guess I've messed up somewhere else.