llvm-project/clang/unittests
Gabor Marton 48b16e1005 [ASTImporter] Reorder fields after structure import is finished
We reorder declarations in RecordDecls because they may have another order
in the "to" context than they have in the "from" context. This may happen
e.g when we import a class like this:
   struct declToImport {
       int a = c + b;
       int b = 1;
       int c = 2;
   };
During the import of `a` we import first the dependencies in sequence,
thus the order would be `c`, `b`, `a`. We will get the normal order by
first removing the already imported members and then adding them in the
order as they apper in the "from" context.

Keeping field order is vital because it determines structure layout.

Reviewers: a_sidorin, shafik

Tags: #clang

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

llvm-svn: 366997
2019-07-25 09:07:17 +00:00
..
AST [ASTImporter] Reorder fields after structure import is finished 2019-07-25 09:07:17 +00:00
ASTMatchers cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Analysis Removed the test case added in D63538 due to windows buildbot failures 2019-07-05 14:22:10 +00:00
Basic cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
CodeGen cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
CrossTU [CrossTU] Add a function to retrieve original source location. 2019-07-24 10:16:37 +00:00
DirectoryWatcher [DirectoryWatcher][test] Relax test assumptions 2019-07-15 22:11:51 +00:00
Driver cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Format clang-format: Add another test like r366926 2019-07-24 17:15:47 +00:00
Frontend cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Index cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Lex [clang-scan-deps] Dependency directives source minimizer: handle #pragma once 2019-07-18 22:33:14 +00:00
Rename cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Rewrite [Rewrite] Try to fix buildbot link fail left by r365263 2019-07-06 16:28:32 +00:00
Sema cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Serialization cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
StaticAnalyzer cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Tooling [AST] Treat semantic form of InitListExpr as implicit code in traversals 2019-07-22 09:58:53 +00:00
libclang Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00