sandboxed-api/sandboxed_api/tools/clang_generator
Christian Blichmann c501379056 Clang tool: Prevent extra nesting of namespaces
When specifying the `namespace` argument in Bazel (`NAMESPACE` in CMake), the
Clang tool used to put _all_ dependent types in that namespace.

For a declaration of `namespace a::b { struct S {...};` and a `namespace`
argument of `a::b`, this means that the header output was similar to
```
namespace a::b {
namespace a::b {
struct S { ...
```

This was never intended and also does not match the Python based header
generator. The Clang tool now "merges" those same namespaces. This is
correct, as it processes `namespace`d spellings with their full namespace
path.

PiperOrigin-RevId: 557393076
Change-Id: I1474dd30b6c4150d0ae3c1c48579f88060974980
2023-08-16 01:17:54 -07:00
..
BUILD.bazel clang_generator: Implement limit_scan_depth feature 2022-11-23 09:09:50 -08:00
CMakeLists.txt Add GitHub workflow to build Clang tool based header generator 2023-05-15 23:45:57 -07: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 tool: Emit aggregates with default initialized members 2023-08-14 06:14:43 -07:00
emitter.cc Clang tool: Prevent extra nesting of namespaces 2023-08-16 01:17:54 -07: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 clang_generator: Implement limit_scan_depth feature 2022-11-23 09:09:50 -08:00
generator.cc Clang tool: Force-undefine feature preprocessor defines 2023-06-13 00:38:05 -07:00
generator.h Clang tool: Enable incremental pre-processing 2023-06-13 01:04:38 -07:00
types.cc clang_generator: Skip dependent types 2022-11-23 08:32:19 -08:00
types.h clang_generator: Handle inter-type dependencies better 2022-11-14 08:19:13 -08:00