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
7 files changed
tree: 967cd20546bda8b84f1a98f2aabe24d9f1d3e544
  1. .bazelci/
  2. .github/
  3. cmake/
  4. contrib/
  5. oss-internship-2020/
  6. sandboxed_api/
  7. .bazelignore
  8. .bazelrc
  9. .clang-format
  10. .gitignore
  11. .gitmodules
  12. CMakeLists.txt
  13. CONTRIBUTING.md
  14. LICENSE
  15. README.md
  16. WORKSPACE
README.md

Sandbox

Copyright 2019-2022 Google LLC

Bazel build status CMake build status

What is Sandboxed API?

The Sandboxed API project (SAPI) makes sandboxing of C/C++ libraries less burdensome: after initial setup of security policies and generation of library interfaces, a stub API is generated, transparently forwarding calls using a custom RPC layer to the real library running inside a sandboxed environment.

Additionally, each SAPI library utilizes a tightly defined security policy, in contrast to the typical sandboxed project, where security policies must cover the total syscall/resource footprint of all its libraries.

Documentation

Developer documentation is available on the Google Developers site for Sandboxed API.

There is also a Getting Started guide.

Getting Involved

If you want to contribute, please read CONTRIBUTING.md and send us pull requests. You can also report bugs or file feature requests.

If you'd like to talk to the developers or get notified about major product updates, you may want to subscribe to our mailing list or sign up with this link.