sandboxed-api/sandboxed_api/tools/clang_generator
Christian Blichmann 67bc67bbef clang_generator: Handle inter-type dependencies better
This change changes the emitter to work on `clang::TypeDecl`s instead of
`clang::QualType`s, as the latter only describe complete definitions. This
allows us to better deal with situations where we would otherwise have a kind
of circular type dependencies: For example, a `typedef` that depends on a
`struct` which in turn has a member that references the typedef.
For this to work, we now also record the actual source order of declarations,
similar to what the libclang based header generator does.

Also add some more tests for the newly covered cases.

PiperOrigin-RevId: 488370914
Change-Id: I2d1baa863fb12d1801bf11a20f3f88df7fde3129
2022-11-14 08:19:13 -08:00
..
BUILD.bazel clang_generator: Use fully-qualified names, emit in source order 2022-11-07 00:37:53 -08:00
CMakeLists.txt clang_generator: Use fully-qualified names, emit in source order 2022-11-07 00:37:53 -08:00
compilation_database.cc clang_generator: Enable mixed header processing 2022-03-17 03:41:53 -07:00
compilation_database.h clang_generator: Enable mixed header processing 2022-03-17 03:41:53 -07:00
diagnostics.cc clang_generator: Turn fatal error on struc-by-value into warning 2022-11-03 06:02:32 -07:00
diagnostics.h clang_generator: Turn fatal error on struc-by-value into warning 2022-11-03 06:02:32 -07:00
emitter_test.cc clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00
emitter.cc clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00
emitter.h clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00
frontend_action_test_util.cc clang_generator: Do not collect structs/unions if declared in another record 2022-03-17 03:30:12 -07:00
frontend_action_test_util.h clang_generator: Refactor frontend test utilities 2022-11-01 09:00:34 -07:00
generator_tool.cc #Cleanup: Consistently use std::make_unique 2022-10-12 05:23:42 -07:00
generator.cc clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00
generator.h clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00
types.cc clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00
types.h clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00