diff options
Diffstat (limited to 'clang/unittests/AST/ASTImporterTest.cpp')
-rw-r--r-- | clang/unittests/AST/ASTImporterTest.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index 6ea350cc726..07beccefbc3 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -1472,7 +1472,7 @@ TEST_P(ASTImporterOptionSpecificTestBase, } TEST_P(ASTImporterOptionSpecificTestBase, - DISABLED_CXXRecordDeclFieldOrderShouldNotDependOnImportOrder) { + CXXRecordDeclFieldOrderShouldNotDependOnImportOrder) { Decl *From, *To; std::tie(From, To) = getImportedDecl( // The original recursive algorithm of ASTImporter first imports 'c' then @@ -2795,6 +2795,16 @@ TEST_P(ImportDecl, ImportEnumSequential) { "main.c", enumDecl(), VerificationMatcher); } +TEST_P(ImportDecl, ImportFieldOrder) { + MatchVerifier<Decl> Verifier; + testImport("struct declToImport {" + " int b = a + 2;" + " int a = 5;" + "};", + Lang_CXX11, "", Lang_CXX11, Verifier, + recordDecl(hasFieldOrder({"b", "a"}))); +} + const internal::VariadicDynCastAllOfMatcher<Expr, DependentScopeDeclRefExpr> dependentScopeDeclRefExpr; |