https://reviews.llvm.org/D51633 added error handling in the ASTImporter.cpp which uncovered an underlying bug in which we used the wrong name when handling naming conflicts. This could cause a segmentation fault when attempting to cast an int to an enum during expression parsing.
This test should pass once https://reviews.llvm.org/D59665 is committed.
You can speed up compilation time of this test significantly by removing the printf and the include of cstdio.