Page MenuHomePhabricator

[ASTImporter] Add check for correct import of source locations.
Needs ReviewPublic

Authored by balazske on Apr 9 2019, 7:19 AM.

Details

Summary

Unit tests extended with a new check for source locations.
Currently a simple match check in the node text dumps is done.
The new check is disabled for now, until the failures are fixed.

Diff Detail

Event Timeline

balazske created this revision.Apr 9 2019, 7:19 AM
Herald added a reviewer: shafik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

This test will work theoretically only if the order of every imported Decl (and not only FieldDecl) is correct, this is not the case now. So probably a better solution for the problem should be found: Enumerate and match (the From and To) SourceLocations with AST visitor. There should be some existing code that is doing somewhat similar in clang-query but I did not find it.

balazske updated this revision to Diff 202197.May 30 2019, 8:05 AM

New patch and check the first line of AST dump only.

In the current state there are failing AST tests. This test can be added after the problems are fixed.

balazske updated this revision to Diff 202414.May 31 2019, 4:14 AM
  • Using size_t instead of int.