Index: cfe/trunk/unittests/AST/ASTImporterVisibilityTest.cpp =================================================================== --- cfe/trunk/unittests/AST/ASTImporterVisibilityTest.cpp +++ cfe/trunk/unittests/AST/ASTImporterVisibilityTest.cpp @@ -290,75 +290,83 @@ TypedTest_ImportAfterImportWithMerge(); } -const bool ExpectLink = true; -const bool ExpectNotLink = false; +const bool ExpectLinkedDeclChain = true; +const bool ExpectUnlinkedDeclChain = false; INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportFunctionsVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternF, ExternF, ExpectLink), - std::make_tuple(ExternF, StaticF, ExpectNotLink), - std::make_tuple(ExternF, AnonF, ExpectNotLink), - std::make_tuple(StaticF, ExternF, ExpectNotLink), - std::make_tuple(StaticF, StaticF, ExpectNotLink), - std::make_tuple(StaticF, AnonF, ExpectNotLink), - std::make_tuple(AnonF, ExternF, ExpectNotLink), - std::make_tuple(AnonF, StaticF, ExpectNotLink), - std::make_tuple(AnonF, AnonF, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternF, ExternF, ExpectLinkedDeclChain), + std::make_tuple(ExternF, StaticF, ExpectUnlinkedDeclChain), + std::make_tuple(ExternF, AnonF, ExpectUnlinkedDeclChain), + std::make_tuple(StaticF, ExternF, ExpectUnlinkedDeclChain), + std::make_tuple(StaticF, StaticF, ExpectUnlinkedDeclChain), + std::make_tuple(StaticF, AnonF, ExpectUnlinkedDeclChain), + std::make_tuple(AnonF, ExternF, ExpectUnlinkedDeclChain), + std::make_tuple(AnonF, StaticF, ExpectUnlinkedDeclChain), + std::make_tuple(AnonF, AnonF, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportVariablesVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternV, ExternV, ExpectLink), - std::make_tuple(ExternV, StaticV, ExpectNotLink), - std::make_tuple(ExternV, AnonV, ExpectNotLink), - std::make_tuple(StaticV, ExternV, ExpectNotLink), - std::make_tuple(StaticV, StaticV, ExpectNotLink), - std::make_tuple(StaticV, AnonV, ExpectNotLink), - std::make_tuple(AnonV, ExternV, ExpectNotLink), - std::make_tuple(AnonV, StaticV, ExpectNotLink), - std::make_tuple(AnonV, AnonV, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternV, ExternV, ExpectLinkedDeclChain), + std::make_tuple(ExternV, StaticV, ExpectUnlinkedDeclChain), + std::make_tuple(ExternV, AnonV, ExpectUnlinkedDeclChain), + std::make_tuple(StaticV, ExternV, ExpectUnlinkedDeclChain), + std::make_tuple(StaticV, StaticV, ExpectUnlinkedDeclChain), + std::make_tuple(StaticV, AnonV, ExpectUnlinkedDeclChain), + std::make_tuple(AnonV, ExternV, ExpectUnlinkedDeclChain), + std::make_tuple(AnonV, StaticV, ExpectUnlinkedDeclChain), + std::make_tuple(AnonV, AnonV, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportClassesVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternC, ExternC, ExpectLink), - std::make_tuple(ExternC, AnonC, ExpectNotLink), - std::make_tuple(AnonC, ExternC, ExpectNotLink), - std::make_tuple(AnonC, AnonC, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternC, ExternC, ExpectLinkedDeclChain), + std::make_tuple(ExternC, AnonC, ExpectUnlinkedDeclChain), + std::make_tuple(AnonC, ExternC, ExpectUnlinkedDeclChain), + std::make_tuple(AnonC, AnonC, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportEnumsVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternE, ExternE, ExpectLink), - std::make_tuple(ExternE, AnonE, ExpectNotLink), - std::make_tuple(AnonE, ExternE, ExpectNotLink), - std::make_tuple(AnonE, AnonE, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternE, ExternE, ExpectLinkedDeclChain), + std::make_tuple(ExternE, AnonE, ExpectUnlinkedDeclChain), + std::make_tuple(AnonE, ExternE, ExpectUnlinkedDeclChain), + std::make_tuple(AnonE, AnonE, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportTypedefNameVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, ::testing::Values( - std::make_tuple(ExternTypedef, ExternTypedef, ExpectLink), - std::make_tuple(ExternTypedef, AnonTypedef, ExpectNotLink), - std::make_tuple(AnonTypedef, ExternTypedef, ExpectNotLink), - std::make_tuple(AnonTypedef, AnonTypedef, ExpectNotLink), - - std::make_tuple(ExternUsing, ExternUsing, ExpectLink), - std::make_tuple(ExternUsing, AnonUsing, ExpectNotLink), - std::make_tuple(AnonUsing, ExternUsing, ExpectNotLink), - std::make_tuple(AnonUsing, AnonUsing, ExpectNotLink), - - std::make_tuple(ExternUsing, ExternTypedef, ExpectLink), - std::make_tuple(ExternUsing, AnonTypedef, ExpectNotLink), - std::make_tuple(AnonUsing, ExternTypedef, ExpectNotLink), - std::make_tuple(AnonUsing, AnonTypedef, ExpectNotLink), - - std::make_tuple(ExternTypedef, ExternUsing, ExpectLink), - std::make_tuple(ExternTypedef, AnonUsing, ExpectNotLink), - std::make_tuple(AnonTypedef, ExternUsing, ExpectNotLink), - std::make_tuple(AnonTypedef, AnonUsing, ExpectNotLink))), ); + std::make_tuple(ExternTypedef, ExternTypedef, + ExpectLinkedDeclChain), + std::make_tuple(ExternTypedef, AnonTypedef, + ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, ExternTypedef, + ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, AnonTypedef, ExpectUnlinkedDeclChain), + + std::make_tuple(ExternUsing, ExternUsing, ExpectLinkedDeclChain), + std::make_tuple(ExternUsing, AnonUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, ExternUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, AnonUsing, ExpectUnlinkedDeclChain), + + std::make_tuple(ExternUsing, ExternTypedef, ExpectLinkedDeclChain), + std::make_tuple(ExternUsing, AnonTypedef, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, ExternTypedef, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, AnonTypedef, ExpectUnlinkedDeclChain), + + std::make_tuple(ExternTypedef, ExternUsing, ExpectLinkedDeclChain), + std::make_tuple(ExternTypedef, AnonUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, ExternUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, AnonUsing, + ExpectUnlinkedDeclChain))), ); } // end namespace ast_matchers } // end namespace clang