]> granicus.if.org Git - clang/commit
[ASTImporter] Add test helper Fixture
authorPeter Szecsi <szepet95@gmail.com>
Fri, 30 Mar 2018 22:03:29 +0000 (22:03 +0000)
committerPeter Szecsi <szepet95@gmail.com>
Fri, 30 Mar 2018 22:03:29 +0000 (22:03 +0000)
commit4b384260348361ff9f6df8f5483b28771f87d27b
tree6045f7e7f3e7c3fe1deb6424a25b28d90e4e1cf0
parente7408fe366bb18923fa360b069b4e4566203f34f
[ASTImporter] Add test helper Fixture

Add a helper test Fixture, so we can add tests which can check internal
attributes of AST nodes like getPreviousDecl(), isVirtual(), etc.
This enables us to check if a redeclaration chain is correctly built during
import, if the virtual flag is preserved during import, etc. We cannot check
such attributes with the existing testImport.
Also, this fixture makes it possible to import from several "From" contexts.

We also added several test cases here, some of them are disabled.
We plan to pass the disabled tests in other patches.

Patch by Gabor Marton!

Differential Revision: https://reviews.llvm.org/D43967

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328906 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/AST/ASTImporterTest.cpp
unittests/AST/DeclMatcher.h [new file with mode: 0644]