Repository: rust-lang/rust-bindgen
Pull request #2721 (2024-01-15 01:37:43)

Update minimum regex version to fix compile error
This is reopened PR of https://github.com/rust-lang/rust-bindgen/pull/2717 because I don't have the permission to reopen it.

Even with regex 1.5.1, bindgen fails to build with `-Z minimal-versions`.

```
$ cd path/to/rust-bindgen
$ cargo +nightly update -Z minimal-versions
$ cargo build
   Compiling regex-syntax v0.6.24
error[E0433]: failed to resolve: use of undeclared crate or module `unicode_tables`
   --> /home/kawasin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-syntax-0.6.24/src/unicode.rs:351:13
    |
351 |         use unicode_tables::perl_space::WHITE_SPACE;
    |             ^^^^^^^^^^^^^^ use of undeclared crate or module `unicode_tables`

error[E0433]: failed to resolve: use of undeclared crate or module `unicode_tables`
   --> /home/kawasin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-syntax-0.6.24/src/unicode.rs:375:13
    |
375 |         use unicode_tables::perl_decimal::DECIMAL_NUMBER;
    |             ^^^^^^^^^^^^^^ use of undeclared crate or module `unicode_tables`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `regex-syntax` (lib) due to 2 previous errors

```

---

regex 1.5.3 solves the compile error with unicode-perl feature. https://github.com/rust-lang/regex/blob/master/CHANGELOG.md#153-2021-05-01

Specifing wrong version as the minimum version can cause compile errors on products which depend on bindgen. Minimum versions can be checked with this cargo command.

```
cargo +nightly update -Z minimal-versions
```

kawasin73: r? @emilio
rustbot: **Error**: The feature `assign` is not enabled in this repository.
To enable it add its section in the `triagebot.toml` in the root of the repository.

Please file an issue on GitHub at [triagebot](https://github.com/rust-lang/triagebot) if there's a problem with this bot, or reach out on [#t-infra](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra) on Zulip.

tgross35: Can you just bump it to the latest version that works for our MSRV? I don’t think there’s any reason to keep such an old version as long as we can build, more bugs have been fixed since https://github.com/rust-lang/rust-bindgen/pull/2714#discussion_r1450959192

Patch:
diff --git a/.github/workflows/bindgen.yml b/.github/workflows/bindgen.yml
index 3f85cd86..21f96aed 100644
--- a/.github/workflows/bindgen.yml
+++ b/.github/workflows/bindgen.yml
@@ -7,6 +7,9 @@ on:
   pull_request:
     branches:
       - main
+  merge_group:
+    branches:
+      - main
 
 jobs:
   rustfmt-clippy:
@@ -142,7 +145,7 @@ jobs:
           - debian: null
             cross: null
             rust: null
-        llvm_version: ["5.0", "9.0"]
+        llvm_version: ["9.0", "16.0"]
         main_tests: [1]
         release_build: [0, 1]
         no_default_features: [0, 1]
@@ -155,7 +158,7 @@ jobs:
           # Test with extra asserts + docs just with latest llvm versions to
           # prevent explosion
           - os: ubuntu-latest
-            llvm_version: "9.0"
+            llvm_version: "16.0"
             release_build: 0
             no_default_features: 0
             feature_extra_asserts: 1
@@ -169,12 +172,15 @@ jobs:
           #     debian: arm64
           #     cross: aarch64-linux-gnu
           #     rust: aarch64-unknown-linux-gnu
-          #   llvm_version: "9.0"
+          #   llvm_version: "16.0"
           #   main_tests: 0
           #   release_build: 0
           #   feature_extra_asserts: 0
 
           # Ensure stuff works on macos too
+          # FIXME: Ideally should use the latest llvm version, but llvm doesn't
+          # provide releases for x86-64 macOS anymore which is what the runner uses.
+          #
           - os: macos-latest
             llvm_version: "9.0"
             release_build: 0
@@ -251,3 +257,18 @@ jobs:
           curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar xz
           ./mdbook build book
           ./mdbook test book
+
+  # One job that "summarizes" the success state of this pipeline. This can then
+  # be added to branch protection, rather than having to add each job
+  # separately.
+  success:
+    runs-on: ubuntu-latest
+    needs: [rustfmt-clippy, msrv, minimal, docs, quickchecking, test-expectations, test, check-cfg, test-book]
+    # GitHub branch protection is exceedingly silly and treats "jobs skipped
+    # because a dependency failed" as success. So we have to do some
+    # contortions to ensure the job fails if any of its dependencies fails.
+    if: always() # make sure this is never "skipped"
+    steps:
+      # Manually check the status of all dependencies. `if: failure()` does not work.
+      - name: check if any dependency failed
+        run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f39caa1..95b7ac29 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,184 +7,196 @@
   - [Removed](#removed)
   - [Fixed](#fixed)
   - [Security](#security)
-- [0.69.2 (2024-01-13)](#0692-2024-01-13)
+- [0.69.4 (2024-02-04)](#0694-2024-02-04)
   - [Added](#added-1)
   - [Changed](#changed-1)
   - [Removed](#removed-1)
   - [Fixed](#fixed-1)
   - [Security](#security-1)
-- [0.69.1 (2023-11-02)](#0691-2023-11-02)
-  - [Fixed](#fixed-2)
-- [0.69.0 (2023-11-01)](#0690-2023-11-01)
+- [0.69.3 (2024-02-04)](#0693-2024-02-04)
   - [Added](#added-2)
   - [Changed](#changed-2)
   - [Removed](#removed-2)
-  - [Fixed](#fixed-3)
+  - [Fixed](#fixed-2)
   - [Security](#security-2)
-- [0.68.1](#0681)
-  - [Fixed](#fixed-4)
-- [0.68.0](#0680)
+- [0.69.2 (2024-01-13)](#0692-2024-01-13)
   - [Added](#added-3)
   - [Changed](#changed-3)
   - [Removed](#removed-3)
-  - [Fixed](#fixed-5)
-- [0.67.0](#0670)
-- [0.66.1](#0661)
-  - [Removed](#removed-4)
-- [0.66.0](#0660)
+  - [Fixed](#fixed-3)
+  - [Security](#security-3)
+- [0.69.1 (2023-11-02)](#0691-2023-11-02)
+  - [Fixed](#fixed-4)
+- [0.69.0 (2023-11-01)](#0690-2023-11-01)
   - [Added](#added-4)
   - [Changed](#changed-4)
-  - [Removed](#removed-5)
-- [0.65.1](#0651)
+  - [Removed](#removed-4)
+  - [Fixed](#fixed-5)
+  - [Security](#security-4)
+- [0.68.1](#0681)
   - [Fixed](#fixed-6)
-- [0.65.0](#0650)
+- [0.68.0](#0680)
   - [Added](#added-5)
   - [Changed](#changed-5)
+  - [Removed](#removed-5)
+  - [Fixed](#fixed-7)
+- [0.67.0](#0670)
+- [0.66.1](#0661)
   - [Removed](#removed-6)
-- [0.64.0](#0640)
+- [0.66.0](#0660)
   - [Added](#added-6)
   - [Changed](#changed-6)
-- [0.63.0](#0630)
+  - [Removed](#removed-7)
+- [0.65.1](#0651)
+  - [Fixed](#fixed-8)
+- [0.65.0](#0650)
   - [Added](#added-7)
   - [Changed](#changed-7)
-  - [Removed](#removed-7)
-- [0.62.0](#0620)
+  - [Removed](#removed-8)
+- [0.64.0](#0640)
   - [Added](#added-8)
   - [Changed](#changed-8)
-  - [Fixed](#fixed-7)
-- [0.61.0](#0610)
+- [0.63.0](#0630)
   - [Added](#added-9)
   - [Changed](#changed-9)
-  - [Fixed](#fixed-8)
-- [0.60.1](#0601)
-  - [Fixed](#fixed-9)
-- [0.60.0](#0600)
+  - [Removed](#removed-9)
+- [0.62.0](#0620)
   - [Added](#added-10)
-  - [Fixed](#fixed-10)
   - [Changed](#changed-10)
-  - [Removed](#removed-8)
-- [0.59.2](#0592)
-- [0.59.1](#0591)
-  - [Fixed](#fixed-11)
-- [0.59.0](#0590)
+  - [Fixed](#fixed-9)
+- [0.61.0](#0610)
   - [Added](#added-11)
-  - [Fixed](#fixed-12)
   - [Changed](#changed-11)
-- [0.58.1](#0581)
+  - [Fixed](#fixed-10)
+- [0.60.1](#0601)
+  - [Fixed](#fixed-11)
+- [0.60.0](#0600)
   - [Added](#added-12)
-- [0.58.0](#0580)
-  - [Added](#added-13)
-  - [Fixed](#fixed-13)
+  - [Fixed](#fixed-12)
   - [Changed](#changed-12)
-  - [Deprecated](#deprecated)
-  - [Removed](#removed-9)
+  - [Removed](#removed-10)
+- [0.59.2](#0592)
+- [0.59.1](#0591)
+  - [Fixed](#fixed-13)
+- [0.59.0](#0590)
+  - [Added](#added-13)
   - [Fixed](#fixed-14)
-  - [Security](#security-3)
-- [0.57.0](#0570)
+  - [Changed](#changed-13)
+- [0.58.1](#0581)
   - [Added](#added-14)
-  - [Fixed](#fixed-15)
-- [0.56.0](#0560)
+- [0.58.0](#0580)
   - [Added](#added-15)
-  - [Changed](#changed-13)
+  - [Fixed](#fixed-15)
+  - [Changed](#changed-14)
+  - [Deprecated](#deprecated)
+  - [Removed](#removed-11)
   - [Fixed](#fixed-16)
-- [0.55.1](#0551)
-  - [Fixed](#fixed-17)
-- [0.55.0](#0550)
-  - [Removed](#removed-10)
+  - [Security](#security-5)
+- [0.57.0](#0570)
   - [Added](#added-16)
-  - [Changed](#changed-14)
-  - [Fixed](#fixed-18)
-- [0.54.1](#0541)
+  - [Fixed](#fixed-17)
+- [0.56.0](#0560)
   - [Added](#added-17)
   - [Changed](#changed-15)
+  - [Fixed](#fixed-18)
+- [0.55.1](#0551)
   - [Fixed](#fixed-19)
-- [0.54.0](#0540)
+- [0.55.0](#0550)
+  - [Removed](#removed-12)
   - [Added](#added-18)
   - [Changed](#changed-16)
   - [Fixed](#fixed-20)
-- [0.53.3](#0533)
+- [0.54.1](#0541)
   - [Added](#added-19)
-  - [Fixed](#fixed-21)
-- [0.53.2](#0532)
   - [Changed](#changed-17)
-- [0.53.1](#0531)
+  - [Fixed](#fixed-21)
+- [0.54.0](#0540)
   - [Added](#added-20)
-- [0.53.0](#0530)
-  - [Added](#added-21)
   - [Changed](#changed-18)
   - [Fixed](#fixed-22)
-- [0.52.0](#0520)
-  - [Added](#added-22)
-  - [Changed](#changed-19)
+- [0.53.3](#0533)
+  - [Added](#added-21)
   - [Fixed](#fixed-23)
-- [0.51.1](#0511)
-  - [Fixed](#fixed-24)
-  - [Changed](#changed-20)
-- [0.51.0](#0510)
-  - [Fixed](#fixed-25)
-  - [Changed](#changed-21)
+- [0.53.2](#0532)
+  - [Changed](#changed-19)
+- [0.53.1](#0531)
+  - [Added](#added-22)
+- [0.53.0](#0530)
   - [Added](#added-23)
-- [0.50.0](#0500)
+  - [Changed](#changed-20)
+  - [Fixed](#fixed-24)
+- [0.52.0](#0520)
   - [Added](#added-24)
-- [0.49.3](#0493)
-  - [Added](#added-25)
-- [0.49.2](#0492)
-  - [Changed](#changed-22)
-- [0.49.1](#0491)
+  - [Changed](#changed-21)
+  - [Fixed](#fixed-25)
+- [0.51.1](#0511)
   - [Fixed](#fixed-26)
+  - [Changed](#changed-22)
+- [0.51.0](#0510)
+  - [Fixed](#fixed-27)
   - [Changed](#changed-23)
-- [0.49.0](#0490)
+  - [Added](#added-25)
+- [0.50.0](#0500)
   - [Added](#added-26)
-  - [Fixed](#fixed-27)
+- [0.49.3](#0493)
+  - [Added](#added-27)
+- [0.49.2](#0492)
   - [Changed](#changed-24)
-- [0.48.1](#0481)
+- [0.49.1](#0491)
   - [Fixed](#fixed-28)
-- [0.48.0](#0480)
   - [Changed](#changed-25)
+- [0.49.0](#0490)
+  - [Added](#added-28)
   - [Fixed](#fixed-29)
-- [0.47.4](#0474)
-  - [Added](#added-27)
-- [0.47.3](#0473)
   - [Changed](#changed-26)
-- [0.47.2](#0472)
+- [0.48.1](#0481)
   - [Fixed](#fixed-30)
-- [0.47.1](#0471)
+- [0.48.0](#0480)
   - [Changed](#changed-27)
   - [Fixed](#fixed-31)
-- [0.47.0](#0470)
+- [0.47.4](#0474)
+  - [Added](#added-29)
+- [0.47.3](#0473)
   - [Changed](#changed-28)
+- [0.47.2](#0472)
   - [Fixed](#fixed-32)
-- [0.33.1 .. 0.46.0](#0331--0460)
-  - [Added](#added-28)
-  - [Removed](#removed-11)
+- [0.47.1](#0471)
   - [Changed](#changed-29)
   - [Fixed](#fixed-33)
-- [0.33.1](#0331)
+- [0.47.0](#0470)
+  - [Changed](#changed-30)
   - [Fixed](#fixed-34)
-- [0.33.0](#0330)
-- [0.32.2](#0322)
+- [0.33.1 .. 0.46.0](#0331--0460)
+  - [Added](#added-30)
+  - [Removed](#removed-13)
+  - [Changed](#changed-31)
   - [Fixed](#fixed-35)
-- [0.32.1](#0321)
+- [0.33.1](#0331)
   - [Fixed](#fixed-36)
-- [0.32.0](#0320)
-  - [Added](#added-29)
-  - [Changed](#changed-30)
+- [0.33.0](#0330)
+- [0.32.2](#0322)
   - [Fixed](#fixed-37)
-- [0.31.0](#0310)
-  - [Added](#added-30)
-  - [Changed](#changed-31)
-  - [Deprecated](#deprecated-1)
-  - [Removed](#removed-12)
+- [0.32.1](#0321)
   - [Fixed](#fixed-38)
-- [0.30.0](#0300)
+- [0.32.0](#0320)
   - [Added](#added-31)
   - [Changed](#changed-32)
-  - [Deprecated](#deprecated-2)
   - [Fixed](#fixed-39)
-- [0.29.0](#0290)
+- [0.31.0](#0310)
   - [Added](#added-32)
   - [Changed](#changed-33)
+  - [Deprecated](#deprecated-1)
+  - [Removed](#removed-14)
   - [Fixed](#fixed-40)
+- [0.30.0](#0300)
+  - [Added](#added-33)
+  - [Changed](#changed-34)
+  - [Deprecated](#deprecated-2)
+  - [Fixed](#fixed-41)
+- [0.29.0](#0290)
+  - [Added](#added-34)
+  - [Changed](#changed-35)
+  - [Fixed](#fixed-42)
 
 <!-- END doctoc generated TOC please keep comment here to allow auto update -->
 
@@ -192,10 +204,43 @@
 # Unreleased
 ## Added
 ## Changed
+- Add target mappings for riscv64imac and riscv32imafc.
+## Removed
+## Fixed
+## Security
+
+# 0.69.4 (2024-02-04)
+## Added
+## Changed
+- Allow older itertools. (#2745)
 ## Removed
 ## Fixed
 ## Security
 
+# 0.69.3 (2024-02-04)
+## Added
+
+- Added blocklist_var (#2731)
+- Stabilized thiscall_abi (#2661)
+
+## Changed
+
+- Use CR consistently on windows (#2698)
+- Replaced peeking_take_while by itertools (#2724)
+
+## Removed
+## Fixed
+
+- Try to avoid repr(packed) for explicitly aligned types when not needed (#2734)
+- Improved destructor handling on Windows (#2663)
+- Support Float16 (#2667)
+- Fix alignment contribution from bitfields (#2680)
+- Fixed msrv build.
+
+## Security
+
+- Updated shlex dependency (RUSTSEC-2024-0006)
+
 # 0.69.2 (2024-01-13)
 ## Added
 ## Changed
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7e5cdc53..491e2331 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -45,7 +45,7 @@ and introduce yourself.
 
 We abide by the [Rust Code of Conduct][coc] and ask that you do as well.
 
-[coc]: https://www.rust-lang.org/en-US/conduct.html
+[coc]: https://www.rust-lang.org/policies/code-of-conduct
 
 ## Filing an Issue
 
@@ -208,8 +208,8 @@ can add multiple test expectations, one for each supported `libclang`
 version. Instead of having a single `bindgen-tests/tests/expectations/tests/my_test.rs` file,
 add each of:
 
+* `bindgen-tests/tests/expectations/tests/libclang-16/my_test.rs`
 * `bindgen-tests/tests/expectations/tests/libclang-9/my_test.rs`
-* `bindgen-tests/tests/expectations/tests/libclang-5/my_test.rs`
 
 If you need to update the test expectations for a test file that generates
 different bindings for different `libclang` versions, you *don't* need to have
@@ -226,12 +226,6 @@ to check the bindings against with a cargo feature:
 $ cargo test --features __testing_only_libclang_$VERSION
 ```
 
-Where `$VERSION` is one of:
-
-* `4`
-* `3_9`
-* `3_8`
-
 depending on which version of `libclang` you have installed.
 
 ### Integration Tests
diff --git a/Cargo.lock b/Cargo.lock
index a4d120a8..4fa9dbcf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -23,16 +23,16 @@ dependencies = [
 
 [[package]]
 name = "bindgen"
-version = "0.69.1"
+version = "0.69.4"
 dependencies = [
  "annotate-snippets",
  "bitflags 2.2.1",
  "cexpr",
  "clang-sys",
+ "itertools",
  "lazy_static",
  "lazycell",
  "log",
- "peeking_take_while",
  "prettyplease",
  "proc-macro2",
  "quote",
@@ -45,7 +45,7 @@ dependencies = [
 
 [[package]]
 name = "bindgen-cli"
-version = "0.69.1"
+version = "0.69.4"
 dependencies = [
  "bindgen",
  "clap",
@@ -299,6 +299,15 @@ dependencies = [
  "windows-sys 0.48.0",
 ]
 
+[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
 [[package]]
 name = "lazy_static"
 version = "1.4.0"
@@ -406,12 +415,6 @@ version = "3.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
 
-[[package]]
-name = "peeking_take_while"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
-
 [[package]]
 name = "prettyplease"
 version = "0.2.7"
@@ -565,9 +568,9 @@ dependencies = [
 
 [[package]]
 name = "shlex"
-version = "1.1.0"
+version = "1.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
 
 [[package]]
 name = "similar"
diff --git a/appveyor.yml b/appveyor.yml
index 973b4cdf..ffb74eed 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,18 +2,18 @@ environment:
   RUST_BACKTRACE: 1
   RUST_CHANNEL: "%Configuration%"
   matrix:
-  - TARGET: gnu
-    LLVM_VERSION: 5.0.0-1
-    BINDGEN_FEATURES: __testing_only_libclang_5
   - TARGET: gnu
     LLVM_VERSION: 9.0.0-1
     BINDGEN_FEATURES: __testing_only_libclang_9
-  - TARGET: msvc
-    LLVM_VERSION: 5.0.0
-    BINDGEN_FEATURES: __testing_only_libclang_5
+  - TARGET: gnu
+    LLVM_VERSION: 16.0.4
+    BINDGEN_FEATURES: __testing_only_libclang_16
   - TARGET: msvc
     LLVM_VERSION: 9.0.0
     BINDGEN_FEATURES: __testing_only_libclang_9
+  - TARGET: msvc
+    LLVM_VERSION: 16.0.4
+    BINDGEN_FEATURES: __testing_only_libclang_16
 
 configuration:
 - stable
diff --git a/bindgen-cli/Cargo.toml b/bindgen-cli/Cargo.toml
index 27389528..e6427900 100644
--- a/bindgen-cli/Cargo.toml
+++ b/bindgen-cli/Cargo.toml
@@ -11,7 +11,7 @@ readme = "../README.md"
 repository = "https://github.com/rust-lang/rust-bindgen"
 documentation = "https://docs.rs/bindgen"
 homepage = "https://rust-lang.github.io/rust-bindgen/"
-version = "0.69.1"
+version = "0.69.4"
 edition = "2018"
 rust-version = "1.64.0"
 
@@ -20,7 +20,7 @@ path = "main.rs"
 name = "bindgen"
 
 [dependencies]
-bindgen = { path = "../bindgen", version = "=0.69.1",  default-features = false, features = ["__cli", "experimental"] }
+bindgen = { path = "../bindgen", version = "=0.69.4",  default-features = false, features = ["__cli", "experimental"] }
 clap = { version = "4", features = ["derive"] }
 clap_complete = "4"
 env_logger = { version = "0.10.0", optional = true }
@@ -40,7 +40,7 @@ which-rustfmt = ["bindgen/which-rustfmt"]
 # Features used for CI testing 
 __testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
 __testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
-__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
+__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]
 
 [package.metadata.release]
 release = true
diff --git a/bindgen-cli/main.rs b/bindgen-cli/main.rs
index a3407232..4b1bfad2 100644
--- a/bindgen-cli/main.rs
+++ b/bindgen-cli/main.rs
@@ -13,10 +13,10 @@ use crate::options::builder_from_flags;
 #[cfg(feature = "logging")]
 fn clang_version_check() {
     let version = bindgen::clang_version();
-    let expected_version = if cfg!(feature = "__testing_only_libclang_9") {
+    let expected_version = if cfg!(feature = "__testing_only_libclang_16") {
+        Some((16, 0))
+    } else if cfg!(feature = "__testing_only_libclang_9") {
         Some((9, 0))
-    } else if cfg!(feature = "__testing_only_libclang_5") {
-        Some((5, 0))
     } else {
         None
     };
diff --git a/bindgen-cli/options.rs b/bindgen-cli/options.rs
index f82d3919..66bb3f14 100644
--- a/bindgen-cli/options.rs
+++ b/bindgen-cli/options.rs
@@ -156,6 +156,9 @@ struct BindgenCommand {
     /// Mark FILE as hidden.
     #[arg(long, value_name = "FILE")]
     blocklist_file: Vec<String>,
+    /// Mark VAR as hidden.
+    #[arg(long, value_name = "VAR")]
+    blocklist_var: Vec<String>,
     /// Avoid generating layout tests for any type.
     #[arg(long)]
     no_layout_tests: bool,
@@ -471,6 +474,7 @@ where
         blocklist_function,
         blocklist_item,
         blocklist_file,
+        blocklist_var,
         no_layout_tests,
         no_derive_copy,
         no_derive_debug,
@@ -676,6 +680,10 @@ where
         builder = builder.blocklist_file(file);
     }
 
+    for var in blocklist_var {
+        builder = builder.blocklist_var(var);
+    }
+
     if builtins {
         builder = builder.emit_builtins();
     }
diff --git a/bindgen-integration/Cargo.toml b/bindgen-integration/Cargo.toml
index 6c9508ab..ccdd1467 100644
--- a/bindgen-integration/Cargo.toml
+++ b/bindgen-integration/Cargo.toml
@@ -16,4 +16,4 @@ runtime = ["bindgen/runtime"]
 
 __testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
 __testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
-__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
+__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]
diff --git a/bindgen-integration/build.rs b/bindgen-integration/build.rs
index ce4a3200..7021f865 100644
--- a/bindgen-integration/build.rs
+++ b/bindgen-integration/build.rs
@@ -279,7 +279,7 @@ fn setup_wrap_static_fns_test() {
 
     bindings
         .write_to_file(out_rust_file)
-        .expect("Cound not write bindings to the Rust file");
+        .expect("Could not write bindings to the Rust file");
 }
 
 fn main() {
diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml
index 7dd4d01d..95293daf 100644
--- a/bindgen/Cargo.toml
+++ b/bindgen/Cargo.toml
@@ -14,7 +14,7 @@ readme = "../README.md"
 repository = "https://github.com/rust-lang/rust-bindgen"
 documentation = "https://docs.rs/bindgen"
 homepage = "https://rust-lang.github.io/rust-bindgen/"
-version = "0.69.1"
+version = "0.69.4"
 edition = "2018"
 build = "build.rs"
 # If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
@@ -29,14 +29,14 @@ annotate-snippets = { version = "0.9.1", features = ["color"], optional = true }
 bitflags = "2.2.1"
 cexpr = "0.6"
 clang-sys = { version = "1", features = ["clang_6_0"] }
+itertools = { version = ">=0.10,<0.13", default-features = false }
 lazy_static = "1"
 lazycell = "1"
 log = { version = "0.4", optional = true }
-peeking_take_while = "0.1.2"
 prettyplease = { version = "0.2.7", optional = true, features = ["verbatim"] }
 proc-macro2 = { version = "1", default-features = false }
 quote = { version = "1", default-features = false }
-regex = { version = "1.5.1", default-features = false, features = ["std", "unicode-perl"] }
+regex = { version = "1.5.3", default-features = false, features = ["std", "unicode-perl"] }
 rustc-hash = "1.0.1"
 shlex = "1"
 syn = { version = "2.0", features = ["full", "extra-traits", "visit-mut"] }
@@ -58,7 +58,7 @@ __cli = []
 # Features used for CI testing
 __testing_only_extra_assertions = []
 __testing_only_libclang_9 = []
-__testing_only_libclang_5 = []
+__testing_only_libclang_16 = []
 
 [package.metadata.docs.rs]
 features = ["experimental"]
diff --git a/bindgen/clang.rs b/bindgen/clang.rs
index 4a4ed89d..a9a0ec81 100644
--- a/bindgen/clang.rs
+++ b/bindgen/clang.rs
@@ -874,7 +874,7 @@ impl Cursor {
         unsafe { clang_getCXXAccessSpecifier(self.x) }
     }
 
-    /// Is the cursor's referrent publically accessible in C++?
+    /// Is the cursor's referent publically accessible in C++?
     ///
     /// Returns true if self.access_specifier() is `CX_CXXPublic` or
     /// `CX_CXXInvalidAccessSpecifier`.
diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs
index c84320ce..dd1486df 100644
--- a/bindgen/codegen/mod.rs
+++ b/bindgen/codegen/mod.rs
@@ -1977,6 +1977,7 @@ impl CodeGenerator for CompInfo {
             ty,
             &canonical_name,
             visibility,
+            packed,
         );
 
         if !is_opaque {
@@ -2196,7 +2197,14 @@ impl CodeGenerator for CompInfo {
         if let Some(comment) = item.comment(ctx) {
             attributes.push(attributes::doc(comment));
         }
-        if packed && !is_opaque {
+
+        // if a type has both a "packed" attribute and an "align(N)" attribute, then check if the
+        // "packed" attr is redundant, and do not include it if so.
+        if packed &&
+            !is_opaque &&
+            !(explicit_align.is_some() &&
+                self.already_packed(ctx).unwrap_or(false))
+        {
             let n = layout.map_or(1, |l| l.align);
             assert!(ctx.options().rust_features().repr_packed_n || n == 1);
             let packed_repr = if n == 1 {
diff --git a/bindgen/codegen/serialize.rs b/bindgen/codegen/serialize.rs
index 9765a8bd..7f00f809 100644
--- a/bindgen/codegen/serialize.rs
+++ b/bindgen/codegen/serialize.rs
@@ -81,7 +81,7 @@ impl<'a> CSerialize<'a> for Function {
 
         let name = self.name();
 
-        // Function argoments stored as `(name, type_id)` tuples.
+        // Function arguments stored as `(name, type_id)` tuples.
         let args = {
             let mut count = 0;
 
diff --git a/bindgen/codegen/struct_layout.rs b/bindgen/codegen/struct_layout.rs
index a62da695..f4596a19 100644
--- a/bindgen/codegen/struct_layout.rs
+++ b/bindgen/codegen/struct_layout.rs
@@ -91,9 +91,9 @@ impl<'a> StructLayoutTracker<'a> {
         ty: &'a Type,
         name: &'a str,
         visibility: FieldVisibilityKind,
+        is_packed: bool,
     ) -> Self {
         let known_type_layout = ty.layout(ctx);
-        let is_packed = comp.is_packed(ctx, known_type_layout.as_ref());
         let (is_rust_union, can_copy_union_fields) =
             comp.is_rust_union(ctx, known_type_layout.as_ref(), name);
         StructLayoutTracker {
diff --git a/bindgen/ir/annotations.rs b/bindgen/ir/annotations.rs
index d085f5c5..9165f3d3 100644
--- a/bindgen/ir/annotations.rs
+++ b/bindgen/ir/annotations.rs
@@ -8,7 +8,7 @@ use std::str::FromStr;
 
 use crate::clang;
 
-/// What kind of visibility modifer should be used for a struct or field?
+/// What kind of visibility modifier should be used for a struct or field?
 #[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Clone, Debug)]
 pub enum FieldVisibilityKind {
     /// Fields are marked as private, i.e., struct Foo {bar: bool}
diff --git a/bindgen/ir/comp.rs b/bindgen/ir/comp.rs
index 89e77e16..bd4d0162 100644
--- a/bindgen/ir/comp.rs
+++ b/bindgen/ir/comp.rs
@@ -1,5 +1,7 @@
 //! Compound types (unions and structs) in our intermediate representation.
 
+use itertools::Itertools;
+
 use super::analysis::Sizedness;
 use super::annotations::Annotations;
 use super::context::{BindgenContext, FunctionId, ItemId, TypeId, VarId};
@@ -15,7 +17,6 @@ use crate::ir::derive::CanDeriveCopy;
 use crate::parse::ParseError;
 use crate::HashMap;
 use crate::NonCopyUnionStyle;
-use peeking_take_while::PeekableExt;
 use std::cmp;
 use std::io;
 use std::mem;
@@ -146,7 +147,7 @@ pub(crate) trait FieldMethods {
     /// If this is a bitfield, how many bits does it need?
     fn bitfield_width(&self) -> Option<u32>;
 
-    /// Is this feild declared public?
+    /// Is this field declared public?
     fn is_public(&self) -> bool;
 
     /// Get the annotations for this field.
@@ -1641,6 +1642,26 @@ impl CompInfo {
         false
     }
 
+    /// Return true if a compound type is "naturally packed". This means we can exclude the
+    /// "packed" attribute without changing the layout.
+    /// This is useful for types that need an "align(N)" attribute since rustc won't compile
+    /// structs that have both of those attributes.
+    pub(crate) fn already_packed(&self, ctx: &BindgenContext) -> Option<bool> {
+        let mut total_size: usize = 0;
+
+        for field in self.fields().iter() {
+            let layout = field.layout(ctx)?;
+
+            if layout.align != 0 && total_size % layout.align != 0 {
+                return Some(false);
+            }
+
+            total_size += layout.size;
+        }
+
+        Some(true)
+    }
+
     /// Returns true if compound type has been forward declared
     pub(crate) fn is_forward_declaration(&self) -> bool {
         self.is_forward_declaration
diff --git a/bindgen/ir/context.rs b/bindgen/ir/context.rs
index 517d3365..f13f34ab 100644
--- a/bindgen/ir/context.rs
+++ b/bindgen/ir/context.rs
@@ -36,7 +36,7 @@ use std::mem;
 #[derive(Debug, Copy, Clone, Eq, PartialOrd, Ord, Hash)]
 pub(crate) struct ItemId(usize);
 
-/// Declare a newtype around `ItemId` with convesion methods.
+/// Declare a newtype around `ItemId` with conversion methods.
 macro_rules! item_id_newtype {
     (
         $( #[$attr:meta] )*
diff --git a/bindgen/ir/item.rs b/bindgen/ir/item.rs
index dd587b08..2941eb81 100644
--- a/bindgen/ir/item.rs
+++ b/bindgen/ir/item.rs
@@ -668,8 +668,11 @@ impl Item {
                 ItemKind::Function(..) => {
                     ctx.options().blocklisted_functions.matches(&name)
                 }
-                // TODO: Add constant / namespace blocklisting?
-                ItemKind::Var(..) | ItemKind::Module(..) => false,
+                ItemKind::Var(..) => {
+                    ctx.options().blocklisted_vars.matches(&name)
+                }
+                // TODO: Add namespace blocklisting?
+                ItemKind::Module(..) => false,
             }
     }
 
diff --git a/bindgen/ir/item_kind.rs b/bindgen/ir/item_kind.rs
index e8618498..9221b505 100644
--- a/bindgen/ir/item_kind.rs
+++ b/bindgen/ir/item_kind.rs
@@ -26,7 +26,7 @@ pub(crate) enum ItemKind {
 }
 
 impl ItemKind {
-    /// Get a reference to this `ItemKind`'s underying `Module`, or `None` if it
+    /// Get a reference to this `ItemKind`'s underlying `Module`, or `None` if it
     /// is some other kind.
     pub(crate) fn as_module(&self) -> Option<&Module> {
         match *self {
@@ -50,7 +50,7 @@ impl ItemKind {
         self.as_module().is_some()
     }
 
-    /// Get a reference to this `ItemKind`'s underying `Function`, or `None` if
+    /// Get a reference to this `ItemKind`'s underlying `Function`, or `None` if
     /// it is some other kind.
     pub(crate) fn as_function(&self) -> Option<&Function> {
         match *self {
@@ -64,13 +64,13 @@ impl ItemKind {
         self.as_function().is_some()
     }
 
-    /// Get a reference to this `ItemKind`'s underying `Function`, or panic if
+    /// Get a reference to this `ItemKind`'s underlying `Function`, or panic if
     /// it is some other kind.
     pub(crate) fn expect_function(&self) -> &Function {
         self.as_function().expect("Not a function")
     }
 
-    /// Get a reference to this `ItemKind`'s underying `Type`, or `None` if
+    /// Get a reference to this `ItemKind`'s underlying `Type`, or `None` if
     /// it is some other kind.
     pub(crate) fn as_type(&self) -> Option<&Type> {
         match *self {
@@ -79,7 +79,7 @@ impl ItemKind {
         }
     }
 
-    /// Get a mutable reference to this `ItemKind`'s underying `Type`, or `None`
+    /// Get a mutable reference to this `ItemKind`'s underlying `Type`, or `None`
     /// if it is some other kind.
     pub(crate) fn as_type_mut(&mut self) -> Option<&mut Type> {
         match *self {
@@ -93,13 +93,13 @@ impl ItemKind {
         self.as_type().is_some()
     }
 
-    /// Get a reference to this `ItemKind`'s underying `Type`, or panic if it is
+    /// Get a reference to this `ItemKind`'s underlying `Type`, or panic if it is
     /// some other kind.
     pub(crate) fn expect_type(&self) -> &Type {
         self.as_type().expect("Not a type")
     }
 
-    /// Get a reference to this `ItemKind`'s underying `Var`, or `None` if it is
+    /// Get a reference to this `ItemKind`'s underlying `Var`, or `None` if it is
     /// some other kind.
     pub(crate) fn as_var(&self) -> Option<&Var> {
         match *self {
diff --git a/bindgen/ir/objc.rs b/bindgen/ir/objc.rs
index 93d8b3bf..d7f7cc65 100644
--- a/bindgen/ir/objc.rs
+++ b/bindgen/ir/objc.rs
@@ -39,7 +39,7 @@ pub(crate) struct ObjCInterface {
     /// The direct parent for this interface.
     pub(crate) parent_class: Option<ItemId>,
 
-    /// List of the methods defined in this interfae
+    /// List of the methods defined in this interface
     methods: Vec<ObjCMethod>,
 
     class_methods: Vec<ObjCMethod>,
@@ -137,7 +137,7 @@ impl ObjCInterface {
                 CXCursor_ObjCClassRef => {
                     if cursor.kind() == CXCursor_ObjCCategoryDecl {
                         // We are actually a category extension, and we found the reference
-                        // to the original interface, so name this interface approriately
+                        // to the original interface, so name this interface appropriately
                         interface.name = c.spelling();
                         interface.category = Some(cursor.spelling());
                     }
diff --git a/bindgen/ir/ty.rs b/bindgen/ir/ty.rs
index b7a42932..2a24dd02 100644
--- a/bindgen/ir/ty.rs
+++ b/bindgen/ir/ty.rs
@@ -252,7 +252,7 @@ impl Type {
         Cow::Owned(name)
     }
 
-    /// Get this type's santizied name.
+    /// Get this type's sanitized name.
     pub(crate) fn sanitized_name<'a>(
         &'a self,
         ctx: &BindgenContext,
@@ -498,7 +498,7 @@ fn is_invalid_type_param_invalid_start() {
 }
 
 #[test]
-fn is_invalid_type_param_invalid_remaing() {
+fn is_invalid_type_param_invalid_remaining() {
     let ty = Type::new(Some("foo-".into()), None, TypeKind::TypeParam, false);
     assert!(ty.is_invalid_type_param())
 }
@@ -1092,7 +1092,7 @@ impl Type {
                         Item::from_ty_or_ref(inner, location, None, ctx);
                     if inner_id == potential_id {
                         warn!(
-                            "Generating oqaque type instead of self-referential \
+                            "Generating opaque type instead of self-referential \
                             typedef");
                         // This can happen if we bail out of recursive situations
                         // within the clang parsing.
diff --git a/bindgen/lib.rs b/bindgen/lib.rs
index 70aa6714..c2df8a8a 100644
--- a/bindgen/lib.rs
+++ b/bindgen/lib.rs
@@ -144,7 +144,7 @@ impl CodegenConfig {
         self.contains(CodegenConfig::VARS)
     }
 
-    /// Returns true if methds should be generated.
+    /// Returns true if methods should be generated.
     pub fn methods(self) -> bool {
         self.contains(CodegenConfig::METHODS)
     }
@@ -440,13 +440,14 @@ impl Builder {
 
 impl BindgenOptions {
     fn build(&mut self) {
-        const REGEX_SETS_LEN: usize = 28;
+        const REGEX_SETS_LEN: usize = 29;
 
         let regex_sets: [_; REGEX_SETS_LEN] = [
             &mut self.blocklisted_types,
             &mut self.blocklisted_functions,
             &mut self.blocklisted_items,
             &mut self.blocklisted_files,
+            &mut self.blocklisted_vars,
             &mut self.opaque_types,
             &mut self.allowlisted_vars,
             &mut self.allowlisted_types,
@@ -483,6 +484,7 @@ impl BindgenOptions {
                     "--blocklist-function",
                     "--blocklist-item",
                     "--blocklist-file",
+                    "--blocklist-var",
                     "--opaque-type",
                     "--allowlist-type",
                     "--allowlist-function",
@@ -693,6 +695,11 @@ fn rust_to_clang_target(rust_target: &str) -> Box<str> {
         let mut clang_target = "riscv64-".to_owned();
         clang_target.push_str(rust_target.strip_prefix("riscv64gc-").unwrap());
         return clang_target.into();
+    } else if rust_target.starts_with("riscv64imac-") {
+        let mut clang_target = "riscv64-".to_owned();
+        clang_target
+            .push_str(rust_target.strip_prefix("riscv64imac-").unwrap());
+        return clang_target.into();
     } else if rust_target.ends_with("-espidf") {
         let mut clang_target =
             rust_target.strip_suffix("-espidf").unwrap().to_owned();
@@ -711,6 +718,11 @@ fn rust_to_clang_target(rust_target: &str) -> Box<str> {
         clang_target
             .push_str(rust_target.strip_prefix("riscv32imac-").unwrap());
         return clang_target.into();
+    } else if rust_target.starts_with("riscv32imafc-") {
+        let mut clang_target = "riscv32-".to_owned();
+        clang_target
+            .push_str(rust_target.strip_prefix("riscv32imafc-").unwrap());
+        return clang_target.into();
     }
     rust_target.into()
 }
@@ -1239,7 +1251,7 @@ fn get_target_dependent_env_var(
 /// use bindgen::builder;
 /// let bindings = builder()
 ///     .header("path/to/input/header")
-///     .parse_callbacks(Box::new(bindgen::CargoCallbacks))
+///     .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
 ///     .generate();
 /// ```
 #[derive(Debug)]
@@ -1355,6 +1367,10 @@ fn test_rust_to_clang_target_riscv() {
         rust_to_clang_target("riscv64gc-unknown-linux-gnu").as_ref(),
         "riscv64-unknown-linux-gnu"
     );
+    assert_eq!(
+        rust_to_clang_target("riscv64imac-unknown-none-elf").as_ref(),
+        "riscv64-unknown-none-elf"
+    );
     assert_eq!(
         rust_to_clang_target("riscv32imc-unknown-none-elf").as_ref(),
         "riscv32-unknown-none-elf"
@@ -1363,6 +1379,10 @@ fn test_rust_to_clang_target_riscv() {
         rust_to_clang_target("riscv32imac-unknown-none-elf").as_ref(),
         "riscv32-unknown-none-elf"
     );
+    assert_eq!(
+        rust_to_clang_target("riscv32imafc-unknown-none-elf").as_ref(),
+        "riscv32-unknown-none-elf"
+    );
 }
 
 #[test]
diff --git a/bindgen/options/mod.rs b/bindgen/options/mod.rs
index 3a82bcf3..6b5b4d8c 100644
--- a/bindgen/options/mod.rs
+++ b/bindgen/options/mod.rs
@@ -222,6 +222,22 @@ options! {
         },
         as_args: "--blocklist-file",
     },
+    /// Variables that have been blocklisted and should not appear in the generated code.
+    blocklisted_vars: RegexSet {
+        methods: {
+            regex_option! {
+                /// Do not generate any bindings for the given variable.
+                ///
+                /// This option is not recursive, meaning that it will only block variables whose
+                /// names explicitly match the argument of this method.
+                pub fn blocklist_var<T: AsRef<str>>(mut self, arg: T) -> Builder {
+                    self.options.blocklisted_vars.insert(arg);
+                    self
+                }
+            }
+        },
+        as_args: "--blocklist-var",
+    },
     /// Types that should be treated as opaque structures in the generated code.
     opaque_types: RegexSet {
         methods: {
@@ -492,7 +508,7 @@ options! {
     constified_enums: RegexSet {
         methods: {
             regex_option! {
-                /// Mark the given `enum` as a set o integer constants.
+                /// Mark the given `enum` as a set of integer constants.
                 ///
                 /// This is similar to the [`Builder::constified_enum_module`] style, but the
                 /// constants are generated in the current module instead of in a new module.
@@ -1163,6 +1179,35 @@ options! {
                 self.options.input_headers.push(header.into().into_boxed_str());
                 self
             }
+
+            /// Add input C/C++ header(s) to generate bindings for.
+            ///
+            /// This can be used to generate bindings for a single header:
+            ///
+            /// ```ignore
+            /// let bindings = bindgen::Builder::default()
+            ///     .headers(["input.h"])
+            ///     .generate()
+            ///     .unwrap();
+            /// ```
+            ///
+            /// Or for multiple headers:
+            ///
+            /// ```ignore
+            /// let bindings = bindgen::Builder::default()
+            ///     .headers(["first.h", "second.h", "third.h"])
+            ///     .generate()
+            ///     .unwrap();
+            /// ```
+            pub fn headers<I: IntoIterator>(mut self, headers: I) -> Builder
+            where
+                I::Item: Into<String>,
+            {
+                self.options
+                    .input_headers
+                    .extend(headers.into_iter().map(Into::into).map(Into::into));
+                self
+            }
         },
         // This field is handled specially inside the macro.
         as_args: ignore,
@@ -1798,7 +1843,7 @@ options! {
         },
         as_args: "--dynamic-loading",
     },
-    /// Whether to equire successful linkage for all routines in a shared library.
+    /// Whether to require successful linkage for all routines in a shared library.
     dynamic_link_require_all: bool {
         methods: {
             /// Set whether to require successful linkage for all routines in a shared library.
@@ -1863,7 +1908,7 @@ options! {
         },
         as_args: "--c-naming",
     },
-    /// Wether to always emit explicit padding fields.
+    /// Whether to always emit explicit padding fields.
     force_explicit_padding: bool {
         methods: {
             /// Set whether to always emit explicit padding fields.
diff --git a/book/src/blocklisting.md b/book/src/blocklisting.md
index 6eb57863..535a08c8 100644
--- a/book/src/blocklisting.md
+++ b/book/src/blocklisting.md
@@ -22,6 +22,7 @@ that are transitively included.
 * [`bindgen::Builder::blocklist_function`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.blocklist_function)
 * [`bindgen::Builder::blocklist_item`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.blocklist_item)
 * [`bindgen::Builder::blocklist_type`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.blocklist_type)
+* [`bindgen::Builder::blocklist_var`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.blocklist_var)
 
 ### Command Line
 
@@ -29,6 +30,7 @@ that are transitively included.
 * `--blocklist-function <function>`
 * `--blocklist-item <item>`
 * `--blocklist-type <type>`
+* `--blocklist-var <var>`
 
 
 ### Annotations
diff --git a/book/src/cpp.md b/book/src/cpp.md
index f5091b35..9b451b9d 100644
--- a/book/src/cpp.md
+++ b/book/src/cpp.md
@@ -74,7 +74,7 @@ cannot translate into Rust:
   
 * Many C++ specific aspects of calling conventions. For example in the Itanium abi types that are 
   "[non trivial for the purposes of calls](https://itanium-cxx-abi.github.io/cxx-abi/abi.html#non-trivial)" 
-  should be passed by pointer, even if they are otherwise eligable to be passed in a register.
+  should be passed by pointer, even if they are otherwise eligible to be passed in a register.
   Similarly in both the Itanium and MSVC ABIs such types are returned by "hidden parameter", much like
   large structs in C that would not fit into a register. This also applies to types with any base classes
   in the MSVC ABI (see [x64 calling convention](https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#return-values)).
diff --git a/book/src/non-system-libraries.md b/book/src/non-system-libraries.md
index 7d6e4e3d..d5d288d1 100644
--- a/book/src/non-system-libraries.md
+++ b/book/src/non-system-libraries.md
@@ -14,7 +14,7 @@ int hello();
 
 Given that the library has not been compiled yet, we need to modify the
 `build.rs` build script to compile the `hello.c` source file into a static
-libary:
+library:
 
 ```rust,ignore
 extern crate bindgen;
@@ -48,9 +48,6 @@ fn main() {
     // automatically know it must look for a `libhello.a` file.
     println!("cargo:rustc-link-lib=hello");
 
-    // Tell cargo to invalidate the built crate whenever the header changes.
-    println!("cargo:rerun-if-changed={}", headers_path_str);
-
     // Run `clang` to compile the `hello.c` file into a `hello.o` object file.
     // Unwrap if it is not possible to spawn the process.
     if !std::process::Command::new("clang")
@@ -91,7 +88,7 @@ fn main() {
         .header(headers_path_str)
         // Tell cargo to invalidate the built crate whenever any of the
         // included header files changed.
-        .parse_callbacks(Box::new(CargoCallbacks))
+        .parse_callbacks(Box::new(CargoCallbacks::new()))
         // Finish the builder and generate the bindings.
         .generate()
         // Unwrap the Result and panic on failure.
diff --git a/book/src/objc.md b/book/src/objc.md
index ce6d7567..ed6f2cb8 100644
--- a/book/src/objc.md
+++ b/book/src/objc.md
@@ -18,7 +18,7 @@ objc::runtime::Object` (the pointer to the objective-c instance). The trait
 `IFoo` is needed to allow for the generated inheritance.
 
 Functions that use or return objective-c pointers of instance `Foo` will return
-`Foo`. The reason this works is beacuse `Foo` represented as `transparent`.
+`Foo`. The reason this works is because `Foo` represented as `transparent`.
 This will be helpful for a lot of objective-c frameworks however there are some
 cases where functions return `instancetype` which is a type alias for `id` so
 an occasional `foo.0` may be required. An example of this would in the UIKit
diff --git a/book/src/tutorial-3.md b/book/src/tutorial-3.md
index 599ece27..3248f284 100644
--- a/book/src/tutorial-3.md
+++ b/book/src/tutorial-3.md
@@ -21,9 +21,6 @@ fn main() {
     // shared library.
     println!("cargo:rustc-link-lib=bz2");
 
-    // Tell cargo to invalidate the built crate whenever the wrapper changes
-    println!("cargo:rerun-if-changed=wrapper.h");
-
     // The bindgen::Builder is the main entry point
     // to bindgen, and lets you build up options for
     // the resulting bindings.
@@ -33,7 +30,7 @@ fn main() {
         .header("wrapper.h")
         // Tell cargo to invalidate the built crate whenever any of the
         // included header files changed.
-        .parse_callbacks(Box::new(bindgen::CargoCallbacks))
+        .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
         // Finish the builder and generate the bindings.
         .generate()
         // Unwrap the Result and panic on failure.


Test patch:
diff --git a/bindgen-tests/Cargo.toml b/bindgen-tests/Cargo.toml
index d3907c36..1c06c3f1 100644
--- a/bindgen-tests/Cargo.toml
+++ b/bindgen-tests/Cargo.toml
@@ -23,4 +23,4 @@ which-rustfmt = ["bindgen/which-rustfmt"]
 
 __testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
 __testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
-__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
+__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]
diff --git a/bindgen-tests/tests/expectations/build.rs b/bindgen-tests/tests/expectations/build.rs
index 21111853..6136823e 100644
--- a/bindgen-tests/tests/expectations/build.rs
+++ b/bindgen-tests/tests/expectations/build.rs
@@ -8,7 +8,7 @@ use std::fs;
 use std::io::Write;
 use std::path::Path;
 
-const LIBCLANG_VERSION_DIRS: &[&str] = &["libclang-5", "libclang-9"];
+const LIBCLANG_VERSION_DIRS: &[&str] = &["libclang-9"];
 
 fn main() {
     println!("cargo:rerun-if-changed=build.rs");
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/abi_variadic_function.rs b/bindgen-tests/tests/expectations/tests/abi_variadic_function.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/abi_variadic_function.rs
rename to bindgen-tests/tests/expectations/tests/abi_variadic_function.rs
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/auto.rs b/bindgen-tests/tests/expectations/tests/auto.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/auto.rs
rename to bindgen-tests/tests/expectations/tests/auto.rs
diff --git a/bindgen-tests/tests/expectations/tests/blocklist-var.rs b/bindgen-tests/tests/expectations/tests/blocklist-var.rs
new file mode 100644
index 00000000..fe64295a
--- /dev/null
+++ b/bindgen-tests/tests/expectations/tests/blocklist-var.rs
@@ -0,0 +1,1 @@
+#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
\ No newline at end of file
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/call-conv-field.rs b/bindgen-tests/tests/expectations/tests/call-conv-field.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/call-conv-field.rs
rename to bindgen-tests/tests/expectations/tests/call-conv-field.rs
diff --git a/bindgen-tests/tests/expectations/tests/class.rs b/bindgen-tests/tests/expectations/tests/class.rs
index ce43204d..19668a73 100644
--- a/bindgen-tests/tests/expectations/tests/class.rs
+++ b/bindgen-tests/tests/expectations/tests/class.rs
@@ -178,6 +178,8 @@ pub struct C_with_incomplete_array {
 }
 #[test]
 fn bindgen_test_layout_C_with_incomplete_array() {
+    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_incomplete_array>(),
         40usize,
@@ -188,6 +190,36 @@ fn bindgen_test_layout_C_with_incomplete_array() {
         4usize,
         concat!("Alignment of ", stringify!(C_with_incomplete_array)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array),
+            "::",
+            stringify!(big_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        37usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 impl Default for C_with_incomplete_array {
     fn default() -> Self {
@@ -206,6 +238,8 @@ pub struct C_with_incomplete_array_2 {
 }
 #[test]
 fn bindgen_test_layout_C_with_incomplete_array_2() {
+    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array_2> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_incomplete_array_2>(),
         4usize,
@@ -216,6 +250,26 @@ fn bindgen_test_layout_C_with_incomplete_array_2() {
         4usize,
         concat!("Alignment of ", stringify!(C_with_incomplete_array_2)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array_2),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array_2),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 #[repr(C)]
 pub struct C_with_zero_length_array_and_incomplete_array {
@@ -226,6 +280,10 @@ pub struct C_with_zero_length_array_and_incomplete_array {
 }
 #[test]
 fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
+    const UNINIT: ::std::mem::MaybeUninit<
+        C_with_zero_length_array_and_incomplete_array,
+    > = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array>(),
         40usize,
@@ -239,6 +297,48 @@ fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
             stringify!(C_with_zero_length_array_and_incomplete_array),
         ),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(big_array),
+        ),
+    );
+    assert_eq!(
+        unsafe {
+            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
+        },
+        37usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(zero_length_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        37usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 impl Default for C_with_zero_length_array_and_incomplete_array {
     fn default() -> Self {
@@ -258,6 +358,10 @@ pub struct C_with_zero_length_array_and_incomplete_array_2 {
 }
 #[test]
 fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() {
+    const UNINIT: ::std::mem::MaybeUninit<
+        C_with_zero_length_array_and_incomplete_array_2,
+    > = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array_2>(),
         4usize,
@@ -271,6 +375,38 @@ fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() {
             stringify!(C_with_zero_length_array_and_incomplete_array_2),
         ),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array_2),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe {
+            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
+        },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array_2),
+            "::",
+            stringify!(zero_length_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array_2),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 #[repr(C)]
 #[derive(Debug, Default, Hash, PartialOrd, Ord, PartialEq, Eq)]
@@ -304,6 +440,8 @@ pub struct IncompleteArrayNonCopiable {
 }
 #[test]
 fn bindgen_test_layout_IncompleteArrayNonCopiable() {
+    const UNINIT: ::std::mem::MaybeUninit<IncompleteArrayNonCopiable> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<IncompleteArrayNonCopiable>(),
         8usize,
@@ -314,6 +452,26 @@ fn bindgen_test_layout_IncompleteArrayNonCopiable() {
         8usize,
         concat!("Alignment of ", stringify!(IncompleteArrayNonCopiable)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).whatever) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(IncompleteArrayNonCopiable),
+            "::",
+            stringify!(whatever),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        8usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(IncompleteArrayNonCopiable),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 impl Default for IncompleteArrayNonCopiable {
     fn default() -> Self {
diff --git a/bindgen-tests/tests/expectations/tests/class_1_0.rs b/bindgen-tests/tests/expectations/tests/class_1_0.rs
index 17cf1182..b6544212 100644
--- a/bindgen-tests/tests/expectations/tests/class_1_0.rs
+++ b/bindgen-tests/tests/expectations/tests/class_1_0.rs
@@ -231,6 +231,8 @@ pub struct C_with_incomplete_array {
 }
 #[test]
 fn bindgen_test_layout_C_with_incomplete_array() {
+    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_incomplete_array>(),
         40usize,
@@ -241,6 +243,36 @@ fn bindgen_test_layout_C_with_incomplete_array() {
         4usize,
         concat!("Alignment of ", stringify!(C_with_incomplete_array)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array),
+            "::",
+            stringify!(big_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        37usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 impl Default for C_with_incomplete_array {
     fn default() -> Self {
@@ -259,6 +291,8 @@ pub struct C_with_incomplete_array_2 {
 }
 #[test]
 fn bindgen_test_layout_C_with_incomplete_array_2() {
+    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array_2> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_incomplete_array_2>(),
         4usize,
@@ -269,6 +303,26 @@ fn bindgen_test_layout_C_with_incomplete_array_2() {
         4usize,
         concat!("Alignment of ", stringify!(C_with_incomplete_array_2)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array_2),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_incomplete_array_2),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 #[repr(C)]
 pub struct C_with_zero_length_array_and_incomplete_array {
@@ -279,6 +333,10 @@ pub struct C_with_zero_length_array_and_incomplete_array {
 }
 #[test]
 fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
+    const UNINIT: ::std::mem::MaybeUninit<
+        C_with_zero_length_array_and_incomplete_array,
+    > = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array>(),
         40usize,
@@ -292,6 +350,48 @@ fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
             stringify!(C_with_zero_length_array_and_incomplete_array),
         ),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(big_array),
+        ),
+    );
+    assert_eq!(
+        unsafe {
+            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
+        },
+        37usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(zero_length_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        37usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 impl Default for C_with_zero_length_array_and_incomplete_array {
     fn default() -> Self {
@@ -311,6 +411,10 @@ pub struct C_with_zero_length_array_and_incomplete_array_2 {
 }
 #[test]
 fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() {
+    const UNINIT: ::std::mem::MaybeUninit<
+        C_with_zero_length_array_and_incomplete_array_2,
+    > = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array_2>(),
         4usize,
@@ -324,6 +428,38 @@ fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() {
             stringify!(C_with_zero_length_array_and_incomplete_array_2),
         ),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array_2),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe {
+            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
+        },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array_2),
+            "::",
+            stringify!(zero_length_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(C_with_zero_length_array_and_incomplete_array_2),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 #[repr(C)]
 #[derive(Debug, Default, Hash, PartialEq, Eq)]
@@ -357,6 +493,8 @@ pub struct IncompleteArrayNonCopiable {
 }
 #[test]
 fn bindgen_test_layout_IncompleteArrayNonCopiable() {
+    const UNINIT: ::std::mem::MaybeUninit<IncompleteArrayNonCopiable> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<IncompleteArrayNonCopiable>(),
         8usize,
@@ -367,6 +505,26 @@ fn bindgen_test_layout_IncompleteArrayNonCopiable() {
         8usize,
         concat!("Alignment of ", stringify!(IncompleteArrayNonCopiable)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).whatever) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(IncompleteArrayNonCopiable),
+            "::",
+            stringify!(whatever),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        8usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(IncompleteArrayNonCopiable),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 impl Default for IncompleteArrayNonCopiable {
     fn default() -> Self {
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/const_bool.rs b/bindgen-tests/tests/expectations/tests/const_bool.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/const_bool.rs
rename to bindgen-tests/tests/expectations/tests/const_bool.rs
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/constant-evaluate.rs b/bindgen-tests/tests/expectations/tests/constant-evaluate.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/constant-evaluate.rs
rename to bindgen-tests/tests/expectations/tests/constant-evaluate.rs
diff --git a/bindgen-tests/tests/expectations/tests/constified-enum-module-overflow.rs b/bindgen-tests/tests/expectations/tests/constified-enum-module-overflow.rs
index 49498dea..61e666d2 100644
--- a/bindgen-tests/tests/expectations/tests/constified-enum-module-overflow.rs
+++ b/bindgen-tests/tests/expectations/tests/constified-enum-module-overflow.rs
@@ -13,7 +13,7 @@ pub type C_U = B;
 #[repr(C)]
 #[derive(Debug, Default, Copy, Clone)]
 pub struct A {
-    pub u: u8,
+    pub u: B,
 }
 #[test]
 fn bindgen_test_layout_A() {
@@ -44,3 +44,16 @@ fn __bindgen_test_layout_C_open0_A_close0_instantiation() {
         concat!("Alignment of template specialization: ", stringify!(C)),
     );
 }
+#[test]
+fn __bindgen_test_layout_B_open0_A_close0_instantiation() {
+    assert_eq!(
+        ::std::mem::size_of::<B>(),
+        1usize,
+        concat!("Size of template specialization: ", stringify!(B)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<B>(),
+        1usize,
+        concat!("Alignment of template specialization: ", stringify!(B)),
+    );
+}
diff --git a/bindgen-tests/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs b/bindgen-tests/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs
index 2a1090e1..d1b4c900 100644
--- a/bindgen-tests/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs
+++ b/bindgen-tests/tests/expectations/tests/derive-hash-struct-with-incomplete-array.rs
@@ -75,6 +75,8 @@ pub struct test2 {
 }
 #[test]
 fn bindgen_test_layout_test2() {
+    const UNINIT: ::std::mem::MaybeUninit<test2> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<test2>(),
         4usize,
@@ -85,6 +87,21 @@ fn bindgen_test_layout_test2() {
         4usize,
         concat!("Alignment of ", stringify!(test2)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(test2), "::", stringify!(a)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(test2),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
 #[repr(C)]
 #[derive(Debug, Default)]
@@ -95,6 +112,8 @@ pub struct test3 {
 }
 #[test]
 fn bindgen_test_layout_test3() {
+    const UNINIT: ::std::mem::MaybeUninit<test3> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<test3>(),
         4usize,
@@ -105,4 +124,31 @@ fn bindgen_test_layout_test3() {
         4usize,
         concat!("Alignment of ", stringify!(test3)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(test3), "::", stringify!(a)),
+    );
+    assert_eq!(
+        unsafe {
+            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
+        },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(test3),
+            "::",
+            stringify!(zero_length_array),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(test3),
+            "::",
+            stringify!(incomplete_array),
+        ),
+    );
 }
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/error-E0600-cannot-apply-unary-negation-to-u32.rs b/bindgen-tests/tests/expectations/tests/error-E0600-cannot-apply-unary-negation-to-u32.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/error-E0600-cannot-apply-unary-negation-to-u32.rs
rename to bindgen-tests/tests/expectations/tests/error-E0600-cannot-apply-unary-negation-to-u32.rs
diff --git a/bindgen-tests/tests/expectations/tests/incomplete-array-padding.rs b/bindgen-tests/tests/expectations/tests/incomplete-array-padding.rs
index 4a14802d..c8038e1f 100644
--- a/bindgen-tests/tests/expectations/tests/incomplete-array-padding.rs
+++ b/bindgen-tests/tests/expectations/tests/incomplete-array-padding.rs
@@ -122,6 +122,8 @@ pub struct foo {
 }
 #[test]
 fn bindgen_test_layout_foo() {
+    const UNINIT: ::std::mem::MaybeUninit<foo> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<foo>(),
         8usize,
@@ -132,6 +134,11 @@ fn bindgen_test_layout_foo() {
         8usize,
         concat!("Alignment of ", stringify!(foo)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
+        8usize,
+        concat!("Offset of field: ", stringify!(foo), "::", stringify!(b)),
+    );
 }
 impl Default for foo {
     fn default() -> Self {
diff --git a/bindgen-tests/tests/expectations/tests/issue-544-stylo-creduce-2.rs b/bindgen-tests/tests/expectations/tests/issue-544-stylo-creduce-2.rs
index 835f029c..c81b6729 100644
--- a/bindgen-tests/tests/expectations/tests/issue-544-stylo-creduce-2.rs
+++ b/bindgen-tests/tests/expectations/tests/issue-544-stylo-creduce-2.rs
@@ -1,10 +1,11 @@
 #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
 #[repr(C)]
+#[derive(Debug, Copy, Clone)]
 pub struct Foo {
-    pub member: Foo_SecondAlias,
+    pub member: *mut Foo_SecondAlias,
 }
 pub type Foo_FirstAlias = [u8; 0usize];
-pub type Foo_SecondAlias = [u8; 0usize];
+pub type Foo_SecondAlias = Foo;
 impl Default for Foo {
     fn default() -> Self {
         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
diff --git a/bindgen-tests/tests/expectations/tests/issue-643-inner-struct.rs b/bindgen-tests/tests/expectations/tests/issue-643-inner-struct.rs
index 673221e3..520b3b0e 100644
--- a/bindgen-tests/tests/expectations/tests/issue-643-inner-struct.rs
+++ b/bindgen-tests/tests/expectations/tests/issue-643-inner-struct.rs
@@ -99,6 +99,8 @@ fn bindgen_test_layout_rte_ring_cons() {
 }
 #[test]
 fn bindgen_test_layout_rte_ring() {
+    const UNINIT: ::std::mem::MaybeUninit<rte_ring> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<rte_ring>(),
         16usize,
@@ -109,6 +111,26 @@ fn bindgen_test_layout_rte_ring() {
         8usize,
         concat!("Alignment of ", stringify!(rte_ring)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).memzone) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(memzone)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).prod) as usize - ptr as usize },
+        8usize,
+        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(prod)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).cons) as usize - ptr as usize },
+        12usize,
+        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(cons)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).ring) as usize - ptr as usize },
+        16usize,
+        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(ring)),
+    );
 }
 impl Default for rte_ring {
     fn default() -> Self {
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/issue-769-bad-instantiation-test.rs b/bindgen-tests/tests/expectations/tests/issue-769-bad-instantiation-test.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/issue-769-bad-instantiation-test.rs
rename to bindgen-tests/tests/expectations/tests/issue-769-bad-instantiation-test.rs
diff --git a/bindgen-tests/tests/expectations/tests/layout_align.rs b/bindgen-tests/tests/expectations/tests/layout_align.rs
index 81fc8359..be77dc75 100644
--- a/bindgen-tests/tests/expectations/tests/layout_align.rs
+++ b/bindgen-tests/tests/expectations/tests/layout_align.rs
@@ -129,6 +129,8 @@ pub struct rte_kni_fifo {
 }
 #[test]
 fn bindgen_test_layout_rte_kni_fifo() {
+    const UNINIT: ::std::mem::MaybeUninit<rte_kni_fifo> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<rte_kni_fifo>(),
         16usize,
@@ -139,6 +141,36 @@ fn bindgen_test_layout_rte_kni_fifo() {
         8usize,
         concat!("Alignment of ", stringify!(rte_kni_fifo)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(write)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize },
+        4usize,
+        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(read)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
+        8usize,
+        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(len)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).elem_size) as usize - ptr as usize },
+        12usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(rte_kni_fifo),
+            "::",
+            stringify!(elem_size),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
+        16usize,
+        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(buffer)),
+    );
 }
 impl Default for rte_kni_fifo {
     fn default() -> Self {
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/inline_namespace_nested.rs b/bindgen-tests/tests/expectations/tests/libclang-5/inline_namespace_nested.rs
deleted file mode 100644
index 996b877e..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-5/inline_namespace_nested.rs
+++ /dev/null
@@ -1,1 +0,0 @@
-/* error generating bindings */
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/issue-2556.rs b/bindgen-tests/tests/expectations/tests/libclang-5/issue-2556.rs
deleted file mode 100644
index 996b877e..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-5/issue-2556.rs
+++ /dev/null
@@ -1,1 +0,0 @@
-/* error generating bindings */
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/objc_template.rs b/bindgen-tests/tests/expectations/tests/libclang-5/objc_template.rs
deleted file mode 100644
index 7ab3ac45..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-5/objc_template.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#![cfg(target_os = "macos")]
-use objc::{self, msg_send, sel, sel_impl, class};
-#[allow(non_camel_case_types)]
-pub type id = *mut objc::runtime::Object;
-#[repr(transparent)]
-#[derive(Debug, Copy, Clone)]
-pub struct Foo(pub id);
-impl std::ops::Deref for Foo {
-    type Target = objc::runtime::Object;
-    fn deref(&self) -> &Self::Target {
-        unsafe { &*self.0 }
-    }
-}
-unsafe impl objc::Message for Foo {}
-impl Foo {
-    pub fn alloc() -> Self {
-        Self(unsafe { msg_send!(class!(Foo), alloc) })
-    }
-}
-impl<ObjectType: 'static> IFoo<ObjectType> for Foo {}
-pub trait IFoo<ObjectType: 'static>: Sized + std::ops::Deref {
-    unsafe fn get(&self) -> *mut ObjectType
-    where
-        <Self as std::ops::Deref>::Target: objc::Message + Sized,
-    {
-        msg_send!(* self, get)
-    }
-}
-#[repr(transparent)]
-#[derive(Debug, Copy, Clone)]
-pub struct FooMultiGeneric(pub id);
-impl std::ops::Deref for FooMultiGeneric {
-    type Target = objc::runtime::Object;
-    fn deref(&self) -> &Self::Target {
-        unsafe { &*self.0 }
-    }
-}
-unsafe impl objc::Message for FooMultiGeneric {}
-impl FooMultiGeneric {
-    pub fn alloc() -> Self {
-        Self(unsafe { msg_send!(class!(FooMultiGeneric), alloc) })
-    }
-}
-impl<KeyType: 'static, ObjectType: 'static> IFooMultiGeneric<KeyType, ObjectType>
-for FooMultiGeneric {}
-pub trait IFooMultiGeneric<
-    KeyType: 'static,
-    ObjectType: 'static,
->: Sized + std::ops::Deref {
-    unsafe fn objectForKey_(&self, key: *mut KeyType) -> *mut ObjectType
-    where
-        <Self as std::ops::Deref>::Target: objc::Message + Sized,
-    {
-        msg_send!(* self, objectForKey : key)
-    }
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/ptr32-has-different-size.rs b/bindgen-tests/tests/expectations/tests/libclang-5/ptr32-has-different-size.rs
deleted file mode 100644
index 0d677052..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-5/ptr32-has-different-size.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct TEST_STRUCT {
-    pub ptr_32bit: *mut ::std::os::raw::c_void,
-}
-#[test]
-fn bindgen_test_layout_TEST_STRUCT() {
-    const UNINIT: ::std::mem::MaybeUninit<TEST_STRUCT> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<TEST_STRUCT>(),
-        8usize,
-        concat!("Size of: ", stringify!(TEST_STRUCT)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<TEST_STRUCT>(),
-        8usize,
-        concat!("Alignment of ", stringify!(TEST_STRUCT)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).ptr_32bit) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(TEST_STRUCT),
-            "::",
-            stringify!(ptr_32bit),
-        ),
-    );
-}
-impl Default for TEST_STRUCT {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-pub type TEST = TEST_STRUCT;
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/abi_variadic_function.rs b/bindgen-tests/tests/expectations/tests/libclang-9/abi_variadic_function.rs
deleted file mode 100644
index 3cb7248c..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/abi_variadic_function.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-extern "C" {
-    #[link_name = "\u{1}_Z1bcz"]
-    pub fn b(arg1: ::std::os::raw::c_char, ...) -> ::std::os::raw::c_char;
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/auto.rs b/bindgen-tests/tests/expectations/tests/libclang-9/auto.rs
deleted file mode 100644
index 340bc670..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/auto.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct Foo {
-    pub _address: u8,
-}
-pub const Foo_kFoo: bool = true;
-#[test]
-fn bindgen_test_layout_Foo() {
-    assert_eq!(
-        ::std::mem::size_of::<Foo>(),
-        1usize,
-        concat!("Size of: ", stringify!(Foo)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<Foo>(),
-        1usize,
-        concat!("Alignment of ", stringify!(Foo)),
-    );
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct Bar {
-    pub _address: u8,
-}
-extern "C" {
-    #[link_name = "\u{1}_Z5Test2v"]
-    pub fn Test2() -> ::std::os::raw::c_uint;
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/call-conv-field.rs b/bindgen-tests/tests/expectations/tests/libclang-9/call-conv-field.rs
deleted file mode 100644
index e3179543..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/call-conv-field.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#![cfg(not(test))]
-#[repr(C)]
-#[derive(Default, Copy, Clone)]
-pub struct JNINativeInterface_ {
-    pub GetVersion: ::std::option::Option<
-        unsafe extern "stdcall" fn(
-            env: *mut ::std::os::raw::c_void,
-        ) -> ::std::os::raw::c_int,
-    >,
-    pub __hack: ::std::os::raw::c_ulonglong,
-}
-#[test]
-fn bindgen_test_layout_JNINativeInterface_() {
-    const UNINIT: ::std::mem::MaybeUninit<JNINativeInterface_> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<JNINativeInterface_>(),
-        16usize,
-        concat!("Size of: ", stringify!(JNINativeInterface_)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<JNINativeInterface_>(),
-        8usize,
-        concat!("Alignment of ", stringify!(JNINativeInterface_)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).GetVersion) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(JNINativeInterface_),
-            "::",
-            stringify!(GetVersion),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).__hack) as usize - ptr as usize },
-        8usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(JNINativeInterface_),
-            "::",
-            stringify!(__hack),
-        ),
-    );
-}
-extern "stdcall" {
-    pub fn bar();
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/class.rs b/bindgen-tests/tests/expectations/tests/libclang-9/class.rs
deleted file mode 100644
index 19668a73..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/class.rs
+++ /dev/null
@@ -1,617 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub const fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-#[repr(C)]
-#[derive(Copy, Clone)]
-pub struct C {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-}
-#[test]
-fn bindgen_test_layout_C() {
-    const UNINIT: ::std::mem::MaybeUninit<C> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(::std::mem::size_of::<C>(), 40usize, concat!("Size of: ", stringify!(C)));
-    assert_eq!(
-        ::std::mem::align_of::<C>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(C), "::", stringify!(a)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!("Offset of field: ", stringify!(C), "::", stringify!(big_array)),
-    );
-}
-impl Default for C {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-pub struct C_with_zero_length_array {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_zero_length_array> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array>(),
-        40usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_zero_length_array)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array),
-            "::",
-            stringify!(big_array),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-}
-impl Default for C_with_zero_length_array {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct C_with_zero_length_array_2 {
-    pub a: ::std::os::raw::c_int,
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array_2() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_zero_length_array_2> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array_2>(),
-        4usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array_2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array_2>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_zero_length_array_2)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_2),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_2),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-}
-#[repr(C)]
-pub struct C_with_incomplete_array {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_incomplete_array() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_incomplete_array>(),
-        40usize,
-        concat!("Size of: ", stringify!(C_with_incomplete_array)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_incomplete_array>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_incomplete_array)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array),
-            "::",
-            stringify!(big_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-impl Default for C_with_incomplete_array {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct C_with_incomplete_array_2 {
-    pub a: ::std::os::raw::c_int,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_incomplete_array_2() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array_2> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_incomplete_array_2>(),
-        4usize,
-        concat!("Size of: ", stringify!(C_with_incomplete_array_2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_incomplete_array_2>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_incomplete_array_2)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array_2),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array_2),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-#[repr(C)]
-pub struct C_with_zero_length_array_and_incomplete_array {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
-    const UNINIT: ::std::mem::MaybeUninit<
-        C_with_zero_length_array_and_incomplete_array,
-    > = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array>(),
-        40usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array_and_incomplete_array)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array_and_incomplete_array>(),
-        4usize,
-        concat!(
-            "Alignment of ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(big_array),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-impl Default for C_with_zero_length_array_and_incomplete_array {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct C_with_zero_length_array_and_incomplete_array_2 {
-    pub a: ::std::os::raw::c_int,
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() {
-    const UNINIT: ::std::mem::MaybeUninit<
-        C_with_zero_length_array_and_incomplete_array_2,
-    > = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array_2>(),
-        4usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array_and_incomplete_array_2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array_and_incomplete_array_2>(),
-        4usize,
-        concat!(
-            "Alignment of ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-#[repr(C)]
-#[derive(Debug, Default, Hash, PartialOrd, Ord, PartialEq, Eq)]
-pub struct WithDtor {
-    pub b: ::std::os::raw::c_int,
-}
-#[test]
-fn bindgen_test_layout_WithDtor() {
-    const UNINIT: ::std::mem::MaybeUninit<WithDtor> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<WithDtor>(),
-        4usize,
-        concat!("Size of: ", stringify!(WithDtor)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<WithDtor>(),
-        4usize,
-        concat!("Alignment of ", stringify!(WithDtor)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(WithDtor), "::", stringify!(b)),
-    );
-}
-#[repr(C)]
-pub struct IncompleteArrayNonCopiable {
-    pub whatever: *mut ::std::os::raw::c_void,
-    pub incomplete_array: __IncompleteArrayField<C>,
-}
-#[test]
-fn bindgen_test_layout_IncompleteArrayNonCopiable() {
-    const UNINIT: ::std::mem::MaybeUninit<IncompleteArrayNonCopiable> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<IncompleteArrayNonCopiable>(),
-        8usize,
-        concat!("Size of: ", stringify!(IncompleteArrayNonCopiable)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<IncompleteArrayNonCopiable>(),
-        8usize,
-        concat!("Alignment of ", stringify!(IncompleteArrayNonCopiable)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).whatever) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(IncompleteArrayNonCopiable),
-            "::",
-            stringify!(whatever),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        8usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(IncompleteArrayNonCopiable),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-impl Default for IncompleteArrayNonCopiable {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Copy, Clone)]
-pub union Union {
-    pub d: f32,
-    pub i: ::std::os::raw::c_int,
-}
-#[test]
-fn bindgen_test_layout_Union() {
-    const UNINIT: ::std::mem::MaybeUninit<Union> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<Union>(),
-        4usize,
-        concat!("Size of: ", stringify!(Union)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<Union>(),
-        4usize,
-        concat!("Alignment of ", stringify!(Union)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(Union), "::", stringify!(d)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(Union), "::", stringify!(i)),
-    );
-}
-impl Default for Union {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Copy, Clone)]
-pub struct WithUnion {
-    pub data: Union,
-}
-#[test]
-fn bindgen_test_layout_WithUnion() {
-    const UNINIT: ::std::mem::MaybeUninit<WithUnion> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<WithUnion>(),
-        4usize,
-        concat!("Size of: ", stringify!(WithUnion)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<WithUnion>(),
-        4usize,
-        concat!("Alignment of ", stringify!(WithUnion)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(WithUnion), "::", stringify!(data)),
-    );
-}
-impl Default for WithUnion {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
-pub struct RealAbstractionWithTonsOfMethods {
-    pub _address: u8,
-}
-#[test]
-fn bindgen_test_layout_RealAbstractionWithTonsOfMethods() {
-    assert_eq!(
-        ::std::mem::size_of::<RealAbstractionWithTonsOfMethods>(),
-        1usize,
-        concat!("Size of: ", stringify!(RealAbstractionWithTonsOfMethods)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<RealAbstractionWithTonsOfMethods>(),
-        1usize,
-        concat!("Alignment of ", stringify!(RealAbstractionWithTonsOfMethods)),
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
-    pub fn RealAbstractionWithTonsOfMethods_bar(
-        this: *const RealAbstractionWithTonsOfMethods,
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEv"]
-    pub fn RealAbstractionWithTonsOfMethods_bar1(
-        this: *mut RealAbstractionWithTonsOfMethods,
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEi"]
-    pub fn RealAbstractionWithTonsOfMethods_bar2(
-        this: *mut RealAbstractionWithTonsOfMethods,
-        foo: ::std::os::raw::c_int,
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3staEv"]
-    pub fn RealAbstractionWithTonsOfMethods_sta();
-}
-impl RealAbstractionWithTonsOfMethods {
-    #[inline]
-    pub unsafe fn bar(&self) {
-        RealAbstractionWithTonsOfMethods_bar(self)
-    }
-    #[inline]
-    pub unsafe fn bar1(&mut self) {
-        RealAbstractionWithTonsOfMethods_bar1(self)
-    }
-    #[inline]
-    pub unsafe fn bar2(&mut self, foo: ::std::os::raw::c_int) {
-        RealAbstractionWithTonsOfMethods_bar2(self, foo)
-    }
-    #[inline]
-    pub unsafe fn sta() {
-        RealAbstractionWithTonsOfMethods_sta()
-    }
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/class_1_0.rs b/bindgen-tests/tests/expectations/tests/libclang-9/class_1_0.rs
deleted file mode 100644
index b6544212..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/class_1_0.rs
+++ /dev/null
@@ -1,668 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-#[repr(C)]
-pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
-impl<T> __BindgenUnionField<T> {
-    #[inline]
-    pub fn new() -> Self {
-        __BindgenUnionField(::std::marker::PhantomData)
-    }
-    #[inline]
-    pub unsafe fn as_ref(&self) -> &T {
-        ::std::mem::transmute(self)
-    }
-    #[inline]
-    pub unsafe fn as_mut(&mut self) -> &mut T {
-        ::std::mem::transmute(self)
-    }
-}
-impl<T> ::std::default::Default for __BindgenUnionField<T> {
-    #[inline]
-    fn default() -> Self {
-        Self::new()
-    }
-}
-impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
-    #[inline]
-    fn clone(&self) -> Self {
-        *self
-    }
-}
-impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
-impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__BindgenUnionField")
-    }
-}
-impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
-    fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
-}
-impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
-    fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
-        true
-    }
-}
-impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
-#[repr(C)]
-#[derive(Copy)]
-pub struct C {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-}
-#[test]
-fn bindgen_test_layout_C() {
-    const UNINIT: ::std::mem::MaybeUninit<C> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(::std::mem::size_of::<C>(), 40usize, concat!("Size of: ", stringify!(C)));
-    assert_eq!(
-        ::std::mem::align_of::<C>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(C), "::", stringify!(a)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!("Offset of field: ", stringify!(C), "::", stringify!(big_array)),
-    );
-}
-impl Clone for C {
-    fn clone(&self) -> Self {
-        *self
-    }
-}
-impl Default for C {
-    fn default() -> Self {
-        unsafe {
-            let mut s: Self = ::std::mem::uninitialized();
-            ::std::ptr::write_bytes(&mut s, 0, 1);
-            s
-        }
-    }
-}
-impl ::std::cmp::PartialEq for C {
-    fn eq(&self, other: &C) -> bool {
-        self.a == other.a && &self.big_array[..] == &other.big_array[..]
-    }
-}
-#[repr(C)]
-pub struct C_with_zero_length_array {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_zero_length_array> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array>(),
-        40usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_zero_length_array)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array),
-            "::",
-            stringify!(big_array),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-}
-impl Default for C_with_zero_length_array {
-    fn default() -> Self {
-        unsafe {
-            let mut s: Self = ::std::mem::uninitialized();
-            ::std::ptr::write_bytes(&mut s, 0, 1);
-            s
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct C_with_zero_length_array_2 {
-    pub a: ::std::os::raw::c_int,
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array_2() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_zero_length_array_2> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array_2>(),
-        4usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array_2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array_2>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_zero_length_array_2)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_2),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_2),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-}
-#[repr(C)]
-pub struct C_with_incomplete_array {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_incomplete_array() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_incomplete_array>(),
-        40usize,
-        concat!("Size of: ", stringify!(C_with_incomplete_array)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_incomplete_array>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_incomplete_array)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array),
-            "::",
-            stringify!(big_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-impl Default for C_with_incomplete_array {
-    fn default() -> Self {
-        unsafe {
-            let mut s: Self = ::std::mem::uninitialized();
-            ::std::ptr::write_bytes(&mut s, 0, 1);
-            s
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct C_with_incomplete_array_2 {
-    pub a: ::std::os::raw::c_int,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_incomplete_array_2() {
-    const UNINIT: ::std::mem::MaybeUninit<C_with_incomplete_array_2> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_incomplete_array_2>(),
-        4usize,
-        concat!("Size of: ", stringify!(C_with_incomplete_array_2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_incomplete_array_2>(),
-        4usize,
-        concat!("Alignment of ", stringify!(C_with_incomplete_array_2)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array_2),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_incomplete_array_2),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-#[repr(C)]
-pub struct C_with_zero_length_array_and_incomplete_array {
-    pub a: ::std::os::raw::c_int,
-    pub big_array: [::std::os::raw::c_char; 33usize],
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
-    const UNINIT: ::std::mem::MaybeUninit<
-        C_with_zero_length_array_and_incomplete_array,
-    > = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array>(),
-        40usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array_and_incomplete_array)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array_and_incomplete_array>(),
-        4usize,
-        concat!(
-            "Alignment of ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).big_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(big_array),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        37usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-impl Default for C_with_zero_length_array_and_incomplete_array {
-    fn default() -> Self {
-        unsafe {
-            let mut s: Self = ::std::mem::uninitialized();
-            ::std::ptr::write_bytes(&mut s, 0, 1);
-            s
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct C_with_zero_length_array_and_incomplete_array_2 {
-    pub a: ::std::os::raw::c_int,
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() {
-    const UNINIT: ::std::mem::MaybeUninit<
-        C_with_zero_length_array_and_incomplete_array_2,
-    > = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array_2>(),
-        4usize,
-        concat!("Size of: ", stringify!(C_with_zero_length_array_and_incomplete_array_2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<C_with_zero_length_array_and_incomplete_array_2>(),
-        4usize,
-        concat!(
-            "Alignment of ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-            "::",
-            stringify!(a),
-        ),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(C_with_zero_length_array_and_incomplete_array_2),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-#[repr(C)]
-#[derive(Debug, Default, Hash, PartialEq, Eq)]
-pub struct WithDtor {
-    pub b: ::std::os::raw::c_int,
-}
-#[test]
-fn bindgen_test_layout_WithDtor() {
-    const UNINIT: ::std::mem::MaybeUninit<WithDtor> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<WithDtor>(),
-        4usize,
-        concat!("Size of: ", stringify!(WithDtor)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<WithDtor>(),
-        4usize,
-        concat!("Alignment of ", stringify!(WithDtor)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(WithDtor), "::", stringify!(b)),
-    );
-}
-#[repr(C)]
-pub struct IncompleteArrayNonCopiable {
-    pub whatever: *mut ::std::os::raw::c_void,
-    pub incomplete_array: __IncompleteArrayField<C>,
-}
-#[test]
-fn bindgen_test_layout_IncompleteArrayNonCopiable() {
-    const UNINIT: ::std::mem::MaybeUninit<IncompleteArrayNonCopiable> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<IncompleteArrayNonCopiable>(),
-        8usize,
-        concat!("Size of: ", stringify!(IncompleteArrayNonCopiable)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<IncompleteArrayNonCopiable>(),
-        8usize,
-        concat!("Alignment of ", stringify!(IncompleteArrayNonCopiable)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).whatever) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(IncompleteArrayNonCopiable),
-            "::",
-            stringify!(whatever),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        8usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(IncompleteArrayNonCopiable),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-impl Default for IncompleteArrayNonCopiable {
-    fn default() -> Self {
-        unsafe {
-            let mut s: Self = ::std::mem::uninitialized();
-            ::std::ptr::write_bytes(&mut s, 0, 1);
-            s
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Hash, PartialEq)]
-pub struct Union {
-    pub d: __BindgenUnionField<f32>,
-    pub i: __BindgenUnionField<::std::os::raw::c_int>,
-    pub bindgen_union_field: u32,
-}
-#[test]
-fn bindgen_test_layout_Union() {
-    const UNINIT: ::std::mem::MaybeUninit<Union> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<Union>(),
-        4usize,
-        concat!("Size of: ", stringify!(Union)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<Union>(),
-        4usize,
-        concat!("Alignment of ", stringify!(Union)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(Union), "::", stringify!(d)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(Union), "::", stringify!(i)),
-    );
-}
-impl Clone for Union {
-    fn clone(&self) -> Self {
-        *self
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Hash, PartialEq)]
-pub struct WithUnion {
-    pub data: Union,
-}
-#[test]
-fn bindgen_test_layout_WithUnion() {
-    const UNINIT: ::std::mem::MaybeUninit<WithUnion> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<WithUnion>(),
-        4usize,
-        concat!("Size of: ", stringify!(WithUnion)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<WithUnion>(),
-        4usize,
-        concat!("Alignment of ", stringify!(WithUnion)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(WithUnion), "::", stringify!(data)),
-    );
-}
-impl Clone for WithUnion {
-    fn clone(&self) -> Self {
-        *self
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Hash, PartialEq, Eq)]
-pub struct RealAbstractionWithTonsOfMethods {
-    pub _address: u8,
-}
-#[test]
-fn bindgen_test_layout_RealAbstractionWithTonsOfMethods() {
-    assert_eq!(
-        ::std::mem::size_of::<RealAbstractionWithTonsOfMethods>(),
-        1usize,
-        concat!("Size of: ", stringify!(RealAbstractionWithTonsOfMethods)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<RealAbstractionWithTonsOfMethods>(),
-        1usize,
-        concat!("Alignment of ", stringify!(RealAbstractionWithTonsOfMethods)),
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
-    pub fn RealAbstractionWithTonsOfMethods_bar(
-        this: *const RealAbstractionWithTonsOfMethods,
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEv"]
-    pub fn RealAbstractionWithTonsOfMethods_bar1(
-        this: *mut RealAbstractionWithTonsOfMethods,
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEi"]
-    pub fn RealAbstractionWithTonsOfMethods_bar2(
-        this: *mut RealAbstractionWithTonsOfMethods,
-        foo: ::std::os::raw::c_int,
-    );
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3staEv"]
-    pub fn RealAbstractionWithTonsOfMethods_sta();
-}
-impl Clone for RealAbstractionWithTonsOfMethods {
-    fn clone(&self) -> Self {
-        *self
-    }
-}
-impl RealAbstractionWithTonsOfMethods {
-    #[inline]
-    pub unsafe fn bar(&self) {
-        RealAbstractionWithTonsOfMethods_bar(self)
-    }
-    #[inline]
-    pub unsafe fn bar1(&mut self) {
-        RealAbstractionWithTonsOfMethods_bar1(self)
-    }
-    #[inline]
-    pub unsafe fn bar2(&mut self, foo: ::std::os::raw::c_int) {
-        RealAbstractionWithTonsOfMethods_bar2(self, foo)
-    }
-    #[inline]
-    pub unsafe fn sta() {
-        RealAbstractionWithTonsOfMethods_sta()
-    }
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/const_bool.rs b/bindgen-tests/tests/expectations/tests/libclang-9/const_bool.rs
deleted file mode 100644
index 97cb7ec6..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/const_bool.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-pub const k: bool = true;
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct A {
-    pub _address: u8,
-}
-pub const A_k: bool = false;
-#[test]
-fn bindgen_test_layout_A() {
-    assert_eq!(::std::mem::size_of::<A>(), 1usize, concat!("Size of: ", stringify!(A)));
-    assert_eq!(
-        ::std::mem::align_of::<A>(),
-        1usize,
-        concat!("Alignment of ", stringify!(A)),
-    );
-}
-pub type foo = bool;
-pub const k2: foo = true;
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/constant-evaluate.rs b/bindgen-tests/tests/expectations/tests/libclang-9/constant-evaluate.rs
deleted file mode 100644
index bbcf6d54..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/constant-evaluate.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-pub const foo: _bindgen_ty_1 = _bindgen_ty_1::foo;
-pub const bar: _bindgen_ty_1 = _bindgen_ty_1::bar;
-#[repr(u32)]
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub enum _bindgen_ty_1 {
-    foo = 4,
-    bar = 8,
-}
-pub type EasyToOverflow = ::std::os::raw::c_ulonglong;
-pub const k: EasyToOverflow = 2147483648;
-pub const k_expr: EasyToOverflow = 1152921504606846976;
-pub const wow: EasyToOverflow = 2147483648;
-pub const BAZ: ::std::os::raw::c_longlong = 24;
-pub const fuzz: f64 = 51.0;
-pub const BAZZ: ::std::os::raw::c_char = 53;
-pub const WAT: ::std::os::raw::c_char = 0;
-pub const bytestring: &[u8; 4] = b"Foo\0";
-pub const NOT_UTF8: &[u8; 5] = b"\xF0(\x8C(\0";
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/constified-enum-module-overflow.rs b/bindgen-tests/tests/expectations/tests/libclang-9/constified-enum-module-overflow.rs
new file mode 100644
index 00000000..49498dea
--- /dev/null
+++ b/bindgen-tests/tests/expectations/tests/libclang-9/constified-enum-module-overflow.rs
@@ -0,0 +1,46 @@
+#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct B {
+    pub _address: u8,
+}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct C {
+    pub _address: u8,
+}
+pub type C_U = B;
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct A {
+    pub u: u8,
+}
+#[test]
+fn bindgen_test_layout_A() {
+    const UNINIT: ::std::mem::MaybeUninit<A> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(::std::mem::size_of::<A>(), 1usize, concat!("Size of: ", stringify!(A)));
+    assert_eq!(
+        ::std::mem::align_of::<A>(),
+        1usize,
+        concat!("Alignment of ", stringify!(A)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(A), "::", stringify!(u)),
+    );
+}
+#[test]
+fn __bindgen_test_layout_C_open0_A_close0_instantiation() {
+    assert_eq!(
+        ::std::mem::size_of::<C>(),
+        1usize,
+        concat!("Size of template specialization: ", stringify!(C)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<C>(),
+        1usize,
+        concat!("Alignment of template specialization: ", stringify!(C)),
+    );
+}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/derive-hash-struct-with-incomplete-array.rs b/bindgen-tests/tests/expectations/tests/libclang-9/derive-hash-struct-with-incomplete-array.rs
deleted file mode 100644
index d1b4c900..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/derive-hash-struct-with-incomplete-array.rs
+++ /dev/null
@@ -1,154 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub const fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct test {
-    pub a: ::std::os::raw::c_int,
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_test() {
-    const UNINIT: ::std::mem::MaybeUninit<test> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<test>(),
-        4usize,
-        concat!("Size of: ", stringify!(test)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<test>(),
-        4usize,
-        concat!("Alignment of ", stringify!(test)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(test), "::", stringify!(a)),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(test),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct test2 {
-    pub a: ::std::os::raw::c_int,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_test2() {
-    const UNINIT: ::std::mem::MaybeUninit<test2> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<test2>(),
-        4usize,
-        concat!("Size of: ", stringify!(test2)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<test2>(),
-        4usize,
-        concat!("Alignment of ", stringify!(test2)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(test2), "::", stringify!(a)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(test2),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct test3 {
-    pub a: ::std::os::raw::c_int,
-    pub zero_length_array: __IncompleteArrayField<::std::os::raw::c_char>,
-    pub incomplete_array: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_test3() {
-    const UNINIT: ::std::mem::MaybeUninit<test3> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<test3>(),
-        4usize,
-        concat!("Size of: ", stringify!(test3)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<test3>(),
-        4usize,
-        concat!("Alignment of ", stringify!(test3)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(test3), "::", stringify!(a)),
-    );
-    assert_eq!(
-        unsafe {
-            ::std::ptr::addr_of!((*ptr).zero_length_array) as usize - ptr as usize
-        },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(test3),
-            "::",
-            stringify!(zero_length_array),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).incomplete_array) as usize - ptr as usize },
-        4usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(test3),
-            "::",
-            stringify!(incomplete_array),
-        ),
-    );
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/error-E0600-cannot-apply-unary-negation-to-u32.rs b/bindgen-tests/tests/expectations/tests/libclang-9/error-E0600-cannot-apply-unary-negation-to-u32.rs
deleted file mode 100644
index 79004238..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/error-E0600-cannot-apply-unary-negation-to-u32.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#![allow(overflowing_literals)]
-pub const a: u32 = 4294967291;
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/incomplete-array-padding.rs b/bindgen-tests/tests/expectations/tests/libclang-9/incomplete-array-padding.rs
deleted file mode 100644
index c8038e1f..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/incomplete-array-padding.rs
+++ /dev/null
@@ -1,180 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
-pub struct __BindgenBitfieldUnit<Storage> {
-    storage: Storage,
-}
-impl<Storage> __BindgenBitfieldUnit<Storage> {
-    #[inline]
-    pub const fn new(storage: Storage) -> Self {
-        Self { storage }
-    }
-}
-impl<Storage> __BindgenBitfieldUnit<Storage>
-where
-    Storage: AsRef<[u8]> + AsMut<[u8]>,
-{
-    #[inline]
-    pub fn get_bit(&self, index: usize) -> bool {
-        debug_assert!(index / 8 < self.storage.as_ref().len());
-        let byte_index = index / 8;
-        let byte = self.storage.as_ref()[byte_index];
-        let bit_index = if cfg!(target_endian = "big") {
-            7 - (index % 8)
-        } else {
-            index % 8
-        };
-        let mask = 1 << bit_index;
-        byte & mask == mask
-    }
-    #[inline]
-    pub fn set_bit(&mut self, index: usize, val: bool) {
-        debug_assert!(index / 8 < self.storage.as_ref().len());
-        let byte_index = index / 8;
-        let byte = &mut self.storage.as_mut()[byte_index];
-        let bit_index = if cfg!(target_endian = "big") {
-            7 - (index % 8)
-        } else {
-            index % 8
-        };
-        let mask = 1 << bit_index;
-        if val {
-            *byte |= mask;
-        } else {
-            *byte &= !mask;
-        }
-    }
-    #[inline]
-    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
-        debug_assert!(bit_width <= 64);
-        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
-        debug_assert!(
-            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
-        );
-        let mut val = 0;
-        for i in 0..(bit_width as usize) {
-            if self.get_bit(i + bit_offset) {
-                let index = if cfg!(target_endian = "big") {
-                    bit_width as usize - 1 - i
-                } else {
-                    i
-                };
-                val |= 1 << index;
-            }
-        }
-        val
-    }
-    #[inline]
-    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
-        debug_assert!(bit_width <= 64);
-        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
-        debug_assert!(
-            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
-        );
-        for i in 0..(bit_width as usize) {
-            let mask = 1 << i;
-            let val_bit_is_set = val & mask == mask;
-            let index = if cfg!(target_endian = "big") {
-                bit_width as usize - 1 - i
-            } else {
-                i
-            };
-            self.set_bit(index + bit_offset, val_bit_is_set);
-        }
-    }
-}
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub const fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct foo {
-    pub _bitfield_align_1: [u8; 0],
-    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
-    pub b: __IncompleteArrayField<*mut ::std::os::raw::c_void>,
-}
-#[test]
-fn bindgen_test_layout_foo() {
-    const UNINIT: ::std::mem::MaybeUninit<foo> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<foo>(),
-        8usize,
-        concat!("Size of: ", stringify!(foo)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<foo>(),
-        8usize,
-        concat!("Alignment of ", stringify!(foo)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
-        8usize,
-        concat!("Offset of field: ", stringify!(foo), "::", stringify!(b)),
-    );
-}
-impl Default for foo {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-impl foo {
-    #[inline]
-    pub fn a(&self) -> ::std::os::raw::c_char {
-        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
-    }
-    #[inline]
-    pub fn set_a(&mut self, val: ::std::os::raw::c_char) {
-        unsafe {
-            let val: u8 = ::std::mem::transmute(val);
-            self._bitfield_1.set(0usize, 1u8, val as u64)
-        }
-    }
-    #[inline]
-    pub fn new_bitfield_1(
-        a: ::std::os::raw::c_char,
-    ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
-        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
-        __bindgen_bitfield_unit
-            .set(
-                0usize,
-                1u8,
-                {
-                    let a: u8 = unsafe { ::std::mem::transmute(a) };
-                    a as u64
-                },
-            );
-        __bindgen_bitfield_unit
-    }
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/issue-544-stylo-creduce-2.rs b/bindgen-tests/tests/expectations/tests/libclang-9/issue-544-stylo-creduce-2.rs
new file mode 100644
index 00000000..5c5ad156
--- /dev/null
+++ b/bindgen-tests/tests/expectations/tests/libclang-9/issue-544-stylo-creduce-2.rs
@@ -0,0 +1,17 @@
+#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct Foo {
+    pub member: *mut [u8; 0usize],
+}
+pub type Foo_FirstAlias = [u8; 0usize];
+pub type Foo_SecondAlias = [u8; 0usize];
+impl Default for Foo {
+    fn default() -> Self {
+        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
+        unsafe {
+            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
+            s.assume_init()
+        }
+    }
+}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/issue-643-inner-struct.rs b/bindgen-tests/tests/expectations/tests/libclang-9/issue-643-inner-struct.rs
deleted file mode 100644
index 520b3b0e..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/issue-643-inner-struct.rs
+++ /dev/null
@@ -1,148 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub const fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct rte_ring {
-    pub memzone: *mut rte_memzone,
-    pub prod: rte_ring_prod,
-    pub cons: rte_ring_cons,
-    pub ring: __IncompleteArrayField<*mut ::std::os::raw::c_void>,
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct rte_ring_prod {
-    pub watermark: ::std::os::raw::c_uint,
-}
-#[test]
-fn bindgen_test_layout_rte_ring_prod() {
-    const UNINIT: ::std::mem::MaybeUninit<rte_ring_prod> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<rte_ring_prod>(),
-        4usize,
-        concat!("Size of: ", stringify!(rte_ring_prod)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<rte_ring_prod>(),
-        4usize,
-        concat!("Alignment of ", stringify!(rte_ring_prod)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).watermark) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(rte_ring_prod),
-            "::",
-            stringify!(watermark),
-        ),
-    );
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct rte_ring_cons {
-    pub sc_dequeue: ::std::os::raw::c_uint,
-}
-#[test]
-fn bindgen_test_layout_rte_ring_cons() {
-    const UNINIT: ::std::mem::MaybeUninit<rte_ring_cons> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<rte_ring_cons>(),
-        4usize,
-        concat!("Size of: ", stringify!(rte_ring_cons)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<rte_ring_cons>(),
-        4usize,
-        concat!("Alignment of ", stringify!(rte_ring_cons)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).sc_dequeue) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(rte_ring_cons),
-            "::",
-            stringify!(sc_dequeue),
-        ),
-    );
-}
-#[test]
-fn bindgen_test_layout_rte_ring() {
-    const UNINIT: ::std::mem::MaybeUninit<rte_ring> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<rte_ring>(),
-        16usize,
-        concat!("Size of: ", stringify!(rte_ring)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<rte_ring>(),
-        8usize,
-        concat!("Alignment of ", stringify!(rte_ring)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).memzone) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(memzone)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).prod) as usize - ptr as usize },
-        8usize,
-        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(prod)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).cons) as usize - ptr as usize },
-        12usize,
-        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(cons)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).ring) as usize - ptr as usize },
-        16usize,
-        concat!("Offset of field: ", stringify!(rte_ring), "::", stringify!(ring)),
-    );
-}
-impl Default for rte_ring {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct rte_memzone {
-    pub _address: u8,
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs b/bindgen-tests/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs
deleted file mode 100644
index ef830ca6..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
-pub mod root {
-    #[allow(unused_imports)]
-    use self::super::root;
-    #[repr(C)]
-    #[derive(Debug, Copy, Clone)]
-    pub struct Rooted<T> {
-        pub member: T,
-        pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
-    }
-    impl<T> Default for Rooted<T> {
-        fn default() -> Self {
-            let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-            unsafe {
-                ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-                s.assume_init()
-            }
-        }
-    }
-    pub type AutoValueVector_Alias = ::std::os::raw::c_int;
-    #[test]
-    fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation() {
-        assert_eq!(
-            ::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>(),
-            4usize,
-            concat!(
-                "Size of template specialization: ",
-                stringify!(root::Rooted < ::std::os::raw::c_int >),
-            ),
-        );
-        assert_eq!(
-            ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(),
-            4usize,
-            concat!(
-                "Alignment of template specialization: ",
-                stringify!(root::Rooted < ::std::os::raw::c_int >),
-            ),
-        );
-    }
-    #[test]
-    fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation() {
-        assert_eq!(
-            ::std::mem::size_of::<root::Rooted<root::AutoValueVector_Alias>>(),
-            4usize,
-            concat!(
-                "Size of template specialization: ",
-                stringify!(root::Rooted < root::AutoValueVector_Alias >),
-            ),
-        );
-        assert_eq!(
-            ::std::mem::align_of::<root::Rooted<root::AutoValueVector_Alias>>(),
-            4usize,
-            concat!(
-                "Alignment of template specialization: ",
-                stringify!(root::Rooted < root::AutoValueVector_Alias >),
-            ),
-        );
-    }
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/layout_align.rs b/bindgen-tests/tests/expectations/tests/libclang-9/layout_align.rs
deleted file mode 100644
index be77dc75..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/layout_align.rs
+++ /dev/null
@@ -1,291 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
-pub struct __BindgenBitfieldUnit<Storage> {
-    storage: Storage,
-}
-impl<Storage> __BindgenBitfieldUnit<Storage> {
-    #[inline]
-    pub const fn new(storage: Storage) -> Self {
-        Self { storage }
-    }
-}
-impl<Storage> __BindgenBitfieldUnit<Storage>
-where
-    Storage: AsRef<[u8]> + AsMut<[u8]>,
-{
-    #[inline]
-    pub fn get_bit(&self, index: usize) -> bool {
-        debug_assert!(index / 8 < self.storage.as_ref().len());
-        let byte_index = index / 8;
-        let byte = self.storage.as_ref()[byte_index];
-        let bit_index = if cfg!(target_endian = "big") {
-            7 - (index % 8)
-        } else {
-            index % 8
-        };
-        let mask = 1 << bit_index;
-        byte & mask == mask
-    }
-    #[inline]
-    pub fn set_bit(&mut self, index: usize, val: bool) {
-        debug_assert!(index / 8 < self.storage.as_ref().len());
-        let byte_index = index / 8;
-        let byte = &mut self.storage.as_mut()[byte_index];
-        let bit_index = if cfg!(target_endian = "big") {
-            7 - (index % 8)
-        } else {
-            index % 8
-        };
-        let mask = 1 << bit_index;
-        if val {
-            *byte |= mask;
-        } else {
-            *byte &= !mask;
-        }
-    }
-    #[inline]
-    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
-        debug_assert!(bit_width <= 64);
-        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
-        debug_assert!(
-            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
-        );
-        let mut val = 0;
-        for i in 0..(bit_width as usize) {
-            if self.get_bit(i + bit_offset) {
-                let index = if cfg!(target_endian = "big") {
-                    bit_width as usize - 1 - i
-                } else {
-                    i
-                };
-                val |= 1 << index;
-            }
-        }
-        val
-    }
-    #[inline]
-    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
-        debug_assert!(bit_width <= 64);
-        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
-        debug_assert!(
-            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
-        );
-        for i in 0..(bit_width as usize) {
-            let mask = 1 << i;
-            let val_bit_is_set = val & mask == mask;
-            let index = if cfg!(target_endian = "big") {
-                bit_width as usize - 1 - i
-            } else {
-                i
-            };
-            self.set_bit(index + bit_offset, val_bit_is_set);
-        }
-    }
-}
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub const fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct rte_kni_fifo {
-    ///< Next position to be written
-    pub write: ::std::os::raw::c_uint,
-    ///< Next position to be read
-    pub read: ::std::os::raw::c_uint,
-    ///< Circular buffer length
-    pub len: ::std::os::raw::c_uint,
-    ///< Pointer size - for 32/64 bit OS
-    pub elem_size: ::std::os::raw::c_uint,
-    ///< The buffer contains mbuf pointers
-    pub buffer: __IncompleteArrayField<*mut ::std::os::raw::c_void>,
-}
-#[test]
-fn bindgen_test_layout_rte_kni_fifo() {
-    const UNINIT: ::std::mem::MaybeUninit<rte_kni_fifo> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<rte_kni_fifo>(),
-        16usize,
-        concat!("Size of: ", stringify!(rte_kni_fifo)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<rte_kni_fifo>(),
-        8usize,
-        concat!("Alignment of ", stringify!(rte_kni_fifo)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(write)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize },
-        4usize,
-        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(read)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
-        8usize,
-        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(len)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).elem_size) as usize - ptr as usize },
-        12usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(rte_kni_fifo),
-            "::",
-            stringify!(elem_size),
-        ),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
-        16usize,
-        concat!("Offset of field: ", stringify!(rte_kni_fifo), "::", stringify!(buffer)),
-    );
-}
-impl Default for rte_kni_fifo {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-#[repr(C)]
-#[repr(align(8))]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct rte_eth_link {
-    ///< ETH_SPEED_NUM_
-    pub link_speed: u32,
-    pub _bitfield_align_1: [u8; 0],
-    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
-    pub __bindgen_padding_0: [u8; 3usize],
-}
-#[test]
-fn bindgen_test_layout_rte_eth_link() {
-    const UNINIT: ::std::mem::MaybeUninit<rte_eth_link> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<rte_eth_link>(),
-        8usize,
-        concat!("Size of: ", stringify!(rte_eth_link)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<rte_eth_link>(),
-        8usize,
-        concat!("Alignment of ", stringify!(rte_eth_link)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).link_speed) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(rte_eth_link),
-            "::",
-            stringify!(link_speed),
-        ),
-    );
-}
-impl rte_eth_link {
-    #[inline]
-    pub fn link_duplex(&self) -> u16 {
-        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) }
-    }
-    #[inline]
-    pub fn set_link_duplex(&mut self, val: u16) {
-        unsafe {
-            let val: u16 = ::std::mem::transmute(val);
-            self._bitfield_1.set(0usize, 1u8, val as u64)
-        }
-    }
-    #[inline]
-    pub fn link_autoneg(&self) -> u16 {
-        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) }
-    }
-    #[inline]
-    pub fn set_link_autoneg(&mut self, val: u16) {
-        unsafe {
-            let val: u16 = ::std::mem::transmute(val);
-            self._bitfield_1.set(1usize, 1u8, val as u64)
-        }
-    }
-    #[inline]
-    pub fn link_status(&self) -> u16 {
-        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) }
-    }
-    #[inline]
-    pub fn set_link_status(&mut self, val: u16) {
-        unsafe {
-            let val: u16 = ::std::mem::transmute(val);
-            self._bitfield_1.set(2usize, 1u8, val as u64)
-        }
-    }
-    #[inline]
-    pub fn new_bitfield_1(
-        link_duplex: u16,
-        link_autoneg: u16,
-        link_status: u16,
-    ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
-        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
-        __bindgen_bitfield_unit
-            .set(
-                0usize,
-                1u8,
-                {
-                    let link_duplex: u16 = unsafe { ::std::mem::transmute(link_duplex) };
-                    link_duplex as u64
-                },
-            );
-        __bindgen_bitfield_unit
-            .set(
-                1usize,
-                1u8,
-                {
-                    let link_autoneg: u16 = unsafe {
-                        ::std::mem::transmute(link_autoneg)
-                    };
-                    link_autoneg as u64
-                },
-            );
-        __bindgen_bitfield_unit
-            .set(
-                2usize,
-                1u8,
-                {
-                    let link_status: u16 = unsafe { ::std::mem::transmute(link_status) };
-                    link_status as u64
-                },
-            );
-        __bindgen_bitfield_unit
-    }
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/mangling-win32.rs b/bindgen-tests/tests/expectations/tests/libclang-9/mangling-win32.rs
deleted file mode 100644
index 34efb924..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/mangling-win32.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-extern "C" {
-    pub fn foo();
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct Foo {
-    pub _address: u8,
-}
-extern "C" {
-    #[link_name = "\u{1}?sBar@Foo@@2_NA"]
-    pub static mut Foo_sBar: bool;
-}
-#[test]
-fn bindgen_test_layout_Foo() {
-    assert_eq!(
-        ::std::mem::size_of::<Foo>(),
-        1usize,
-        concat!("Size of: ", stringify!(Foo)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<Foo>(),
-        1usize,
-        concat!("Alignment of ", stringify!(Foo)),
-    );
-}
-extern "fastcall" {
-    pub fn fast_call_func_no_args() -> ::std::os::raw::c_int;
-}
-extern "fastcall" {
-    pub fn fast_call_func_many_args(
-        arg1: ::std::os::raw::c_int,
-        arg2: ::std::os::raw::c_int,
-        arg3: ::std::os::raw::c_int,
-    ) -> ::std::os::raw::c_int;
-}
-extern "stdcall" {
-    pub fn std_call_func_no_args() -> ::std::os::raw::c_int;
-}
-extern "stdcall" {
-    pub fn std_call_func_many_args(
-        arg1: ::std::os::raw::c_int,
-        arg2: ::std::os::raw::c_int,
-        arg3: ::std::os::raw::c_int,
-    ) -> ::std::os::raw::c_int;
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/objc_inheritance.rs b/bindgen-tests/tests/expectations/tests/libclang-9/objc_inheritance.rs
deleted file mode 100644
index 6fb4e6b8..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/objc_inheritance.rs
+++ /dev/null
@@ -1,107 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#![cfg(target_os = "macos")]
-use objc::{self, msg_send, sel, sel_impl, class};
-#[allow(non_camel_case_types)]
-pub type id = *mut objc::runtime::Object;
-#[repr(transparent)]
-#[derive(Debug, Copy, Clone)]
-pub struct Foo(pub id);
-impl std::ops::Deref for Foo {
-    type Target = objc::runtime::Object;
-    fn deref(&self) -> &Self::Target {
-        unsafe { &*self.0 }
-    }
-}
-unsafe impl objc::Message for Foo {}
-impl Foo {
-    pub fn alloc() -> Self {
-        Self(unsafe { msg_send!(class!(Foo), alloc) })
-    }
-}
-impl IFoo for Foo {}
-pub trait IFoo: Sized + std::ops::Deref {}
-#[repr(transparent)]
-#[derive(Debug, Copy, Clone)]
-pub struct Bar(pub id);
-impl std::ops::Deref for Bar {
-    type Target = objc::runtime::Object;
-    fn deref(&self) -> &Self::Target {
-        unsafe { &*self.0 }
-    }
-}
-unsafe impl objc::Message for Bar {}
-impl Bar {
-    pub fn alloc() -> Self {
-        Self(unsafe { msg_send!(class!(Bar), alloc) })
-    }
-}
-impl IFoo for Bar {}
-impl From<Bar> for Foo {
-    fn from(child: Bar) -> Foo {
-        Foo(child.0)
-    }
-}
-impl std::convert::TryFrom<Foo> for Bar {
-    type Error = &'static str;
-    fn try_from(parent: Foo) -> Result<Bar, Self::Error> {
-        let is_kind_of: bool = unsafe { msg_send!(parent, isKindOfClass : class!(Bar)) };
-        if is_kind_of {
-            Ok(Bar(parent.0))
-        } else {
-            Err("This Foo cannot be downcasted to Bar")
-        }
-    }
-}
-impl IBar for Bar {}
-pub trait IBar: Sized + std::ops::Deref {}
-#[repr(transparent)]
-#[derive(Debug, Copy, Clone)]
-pub struct Baz(pub id);
-impl std::ops::Deref for Baz {
-    type Target = objc::runtime::Object;
-    fn deref(&self) -> &Self::Target {
-        unsafe { &*self.0 }
-    }
-}
-unsafe impl objc::Message for Baz {}
-impl Baz {
-    pub fn alloc() -> Self {
-        Self(unsafe { msg_send!(class!(Baz), alloc) })
-    }
-}
-impl IBar for Baz {}
-impl From<Baz> for Bar {
-    fn from(child: Baz) -> Bar {
-        Bar(child.0)
-    }
-}
-impl std::convert::TryFrom<Bar> for Baz {
-    type Error = &'static str;
-    fn try_from(parent: Bar) -> Result<Baz, Self::Error> {
-        let is_kind_of: bool = unsafe { msg_send!(parent, isKindOfClass : class!(Baz)) };
-        if is_kind_of {
-            Ok(Baz(parent.0))
-        } else {
-            Err("This Bar cannot be downcasted to Baz")
-        }
-    }
-}
-impl IFoo for Baz {}
-impl From<Baz> for Foo {
-    fn from(child: Baz) -> Foo {
-        Foo(child.0)
-    }
-}
-impl std::convert::TryFrom<Foo> for Baz {
-    type Error = &'static str;
-    fn try_from(parent: Foo) -> Result<Baz, Self::Error> {
-        let is_kind_of: bool = unsafe { msg_send!(parent, isKindOfClass : class!(Baz)) };
-        if is_kind_of {
-            Ok(Baz(parent.0))
-        } else {
-            Err("This Foo cannot be downcasted to Baz")
-        }
-    }
-}
-impl IBaz for Baz {}
-pub trait IBaz: Sized + std::ops::Deref {}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs b/bindgen-tests/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs
deleted file mode 100644
index 3ba3a82a..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct Base {
-    pub _address: u8,
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct Derived {
-    pub b: bool,
-}
-#[repr(C)]
-#[derive(Debug, Default, Copy, Clone)]
-pub struct Usage {
-    pub _address: u8,
-}
-extern "C" {
-    #[link_name = "\u{1}_ZN5Usage13static_memberE"]
-    pub static mut Usage_static_member: [u32; 2usize];
-}
-#[test]
-fn bindgen_test_layout_Usage() {
-    assert_eq!(
-        ::std::mem::size_of::<Usage>(),
-        1usize,
-        concat!("Size of: ", stringify!(Usage)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<Usage>(),
-        1usize,
-        concat!("Alignment of ", stringify!(Usage)),
-    );
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/struct_typedef_ns.rs b/bindgen-tests/tests/expectations/tests/libclang-9/struct_typedef_ns.rs
new file mode 100644
index 00000000..44afa482
--- /dev/null
+++ b/bindgen-tests/tests/expectations/tests/libclang-9/struct_typedef_ns.rs
@@ -0,0 +1,87 @@
+#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
+pub mod root {
+    #[allow(unused_imports)]
+    use self::super::root;
+    pub mod whatever {
+        #[allow(unused_imports)]
+        use self::super::super::root;
+        #[repr(C)]
+        #[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
+        pub struct typedef_struct {
+            pub foo: ::std::os::raw::c_int,
+        }
+        #[test]
+        fn bindgen_test_layout_typedef_struct() {
+            const UNINIT: ::std::mem::MaybeUninit<typedef_struct> = ::std::mem::MaybeUninit::uninit();
+            let ptr = UNINIT.as_ptr();
+            assert_eq!(
+                ::std::mem::size_of::<typedef_struct>(),
+                4usize,
+                concat!("Size of: ", stringify!(typedef_struct)),
+            );
+            assert_eq!(
+                ::std::mem::align_of::<typedef_struct>(),
+                4usize,
+                concat!("Alignment of ", stringify!(typedef_struct)),
+            );
+            assert_eq!(
+                unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize },
+                0usize,
+                concat!(
+                    "Offset of field: ",
+                    stringify!(typedef_struct),
+                    "::",
+                    stringify!(foo),
+                ),
+            );
+        }
+        #[repr(u32)]
+        #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+        pub enum typedef_enum {
+            BAR = 1,
+        }
+    }
+    pub mod _bindgen_mod_id_12 {
+        #[allow(unused_imports)]
+        use self::super::super::root;
+        #[repr(C)]
+        #[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
+        pub struct _bindgen_ty_1 {
+            pub foo: ::std::os::raw::c_int,
+        }
+        #[test]
+        fn bindgen_test_layout__bindgen_ty_1() {
+            const UNINIT: ::std::mem::MaybeUninit<_bindgen_ty_1> = ::std::mem::MaybeUninit::uninit();
+            let ptr = UNINIT.as_ptr();
+            assert_eq!(
+                ::std::mem::size_of::<_bindgen_ty_1>(),
+                4usize,
+                concat!("Size of: ", stringify!(_bindgen_ty_1)),
+            );
+            assert_eq!(
+                ::std::mem::align_of::<_bindgen_ty_1>(),
+                4usize,
+                concat!("Alignment of ", stringify!(_bindgen_ty_1)),
+            );
+            assert_eq!(
+                unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize },
+                0usize,
+                concat!(
+                    "Offset of field: ",
+                    stringify!(_bindgen_ty_1),
+                    "::",
+                    stringify!(foo),
+                ),
+            );
+        }
+        pub type typedef_struct = root::_bindgen_mod_id_12::_bindgen_ty_1;
+        pub const _bindgen_mod_id_12_BAR: root::_bindgen_mod_id_12::_bindgen_ty_2 = _bindgen_ty_2::BAR;
+        #[repr(u32)]
+        #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+        pub enum _bindgen_ty_2 {
+            BAR = 1,
+        }
+        pub use self::super::super::root::_bindgen_mod_id_12::_bindgen_ty_2 as typedef_enum;
+    }
+}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/type_alias_template_specialized.rs b/bindgen-tests/tests/expectations/tests/libclang-9/type_alias_template_specialized.rs
deleted file mode 100644
index d585a857..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/type_alias_template_specialized.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct Rooted {
-    pub ptr: MaybeWrapped<::std::os::raw::c_int>,
-}
-#[test]
-fn bindgen_test_layout_Rooted() {
-    const UNINIT: ::std::mem::MaybeUninit<Rooted> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<Rooted>(),
-        4usize,
-        concat!("Size of: ", stringify!(Rooted)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<Rooted>(),
-        4usize,
-        concat!("Alignment of ", stringify!(Rooted)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(Rooted), "::", stringify!(ptr)),
-    );
-}
-impl Default for Rooted {
-    fn default() -> Self {
-        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
-        unsafe {
-            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
-            s.assume_init()
-        }
-    }
-}
-/// <div rustbindgen replaces="MaybeWrapped"></div>
-pub type MaybeWrapped<a> = a;
-#[test]
-fn __bindgen_test_layout_MaybeWrapped_open0_int_close0_instantiation() {
-    assert_eq!(
-        ::std::mem::size_of::<MaybeWrapped<::std::os::raw::c_int>>(),
-        4usize,
-        concat!(
-            "Size of template specialization: ",
-            stringify!(MaybeWrapped < ::std::os::raw::c_int >),
-        ),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<MaybeWrapped<::std::os::raw::c_int>>(),
-        4usize,
-        concat!(
-            "Alignment of template specialization: ",
-            stringify!(MaybeWrapped < ::std::os::raw::c_int >),
-        ),
-    );
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/zero-sized-array.rs b/bindgen-tests/tests/expectations/tests/libclang-9/zero-sized-array.rs
deleted file mode 100644
index bc4b6600..00000000
--- a/bindgen-tests/tests/expectations/tests/libclang-9/zero-sized-array.rs
+++ /dev/null
@@ -1,170 +0,0 @@
-#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
-#[repr(C)]
-#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
-impl<T> __IncompleteArrayField<T> {
-    #[inline]
-    pub const fn new() -> Self {
-        __IncompleteArrayField(::std::marker::PhantomData, [])
-    }
-    #[inline]
-    pub fn as_ptr(&self) -> *const T {
-        self as *const _ as *const T
-    }
-    #[inline]
-    pub fn as_mut_ptr(&mut self) -> *mut T {
-        self as *mut _ as *mut T
-    }
-    #[inline]
-    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
-        ::std::slice::from_raw_parts(self.as_ptr(), len)
-    }
-    #[inline]
-    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
-        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
-    }
-}
-impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
-    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-        fmt.write_str("__IncompleteArrayField")
-    }
-}
-/// Bizarrely enough, this should *not* get an `_address` field.
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct ZeroSizedArray {
-    pub arr: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_ZeroSizedArray() {
-    const UNINIT: ::std::mem::MaybeUninit<ZeroSizedArray> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<ZeroSizedArray>(),
-        0usize,
-        concat!("Size of: ", stringify!(ZeroSizedArray)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<ZeroSizedArray>(),
-        1usize,
-        concat!("Alignment of ", stringify!(ZeroSizedArray)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).arr) as usize - ptr as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(ZeroSizedArray), "::", stringify!(arr)),
-    );
-}
-/// And nor should this get an `_address` field.
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct ContainsZeroSizedArray {
-    pub zsa: ZeroSizedArray,
-}
-#[test]
-fn bindgen_test_layout_ContainsZeroSizedArray() {
-    const UNINIT: ::std::mem::MaybeUninit<ContainsZeroSizedArray> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<ContainsZeroSizedArray>(),
-        0usize,
-        concat!("Size of: ", stringify!(ContainsZeroSizedArray)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<ContainsZeroSizedArray>(),
-        1usize,
-        concat!("Alignment of ", stringify!(ContainsZeroSizedArray)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).zsa) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(ContainsZeroSizedArray),
-            "::",
-            stringify!(zsa),
-        ),
-    );
-}
-/** Inheriting from ZeroSizedArray shouldn't cause an `_address` to be inserted
- either.*/
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct InheritsZeroSizedArray {
-    pub _base: ZeroSizedArray,
-}
-#[test]
-fn bindgen_test_layout_InheritsZeroSizedArray() {
-    assert_eq!(
-        ::std::mem::size_of::<InheritsZeroSizedArray>(),
-        0usize,
-        concat!("Size of: ", stringify!(InheritsZeroSizedArray)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<InheritsZeroSizedArray>(),
-        1usize,
-        concat!("Alignment of ", stringify!(InheritsZeroSizedArray)),
-    );
-}
-/// And this should not get an `_address` field either.
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct DynamicallySizedArray {
-    pub arr: __IncompleteArrayField<::std::os::raw::c_char>,
-}
-#[test]
-fn bindgen_test_layout_DynamicallySizedArray() {
-    const UNINIT: ::std::mem::MaybeUninit<DynamicallySizedArray> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<DynamicallySizedArray>(),
-        0usize,
-        concat!("Size of: ", stringify!(DynamicallySizedArray)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<DynamicallySizedArray>(),
-        1usize,
-        concat!("Alignment of ", stringify!(DynamicallySizedArray)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).arr) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(DynamicallySizedArray),
-            "::",
-            stringify!(arr),
-        ),
-    );
-}
-/// No `_address` field here either.
-#[repr(C)]
-#[derive(Debug, Default)]
-pub struct ContainsDynamicallySizedArray {
-    pub dsa: DynamicallySizedArray,
-}
-#[test]
-fn bindgen_test_layout_ContainsDynamicallySizedArray() {
-    const UNINIT: ::std::mem::MaybeUninit<ContainsDynamicallySizedArray> = ::std::mem::MaybeUninit::uninit();
-    let ptr = UNINIT.as_ptr();
-    assert_eq!(
-        ::std::mem::size_of::<ContainsDynamicallySizedArray>(),
-        0usize,
-        concat!("Size of: ", stringify!(ContainsDynamicallySizedArray)),
-    );
-    assert_eq!(
-        ::std::mem::align_of::<ContainsDynamicallySizedArray>(),
-        1usize,
-        concat!("Alignment of ", stringify!(ContainsDynamicallySizedArray)),
-    );
-    assert_eq!(
-        unsafe { ::std::ptr::addr_of!((*ptr).dsa) as usize - ptr as usize },
-        0usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(ContainsDynamicallySizedArray),
-            "::",
-            stringify!(dsa),
-        ),
-    );
-}
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/mangling-win32.rs b/bindgen-tests/tests/expectations/tests/mangling-win32.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/mangling-win32.rs
rename to bindgen-tests/tests/expectations/tests/mangling-win32.rs
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/objc_inheritance.rs b/bindgen-tests/tests/expectations/tests/objc_inheritance.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/objc_inheritance.rs
rename to bindgen-tests/tests/expectations/tests/objc_inheritance.rs
diff --git a/bindgen-tests/tests/expectations/tests/libclang-9/objc_template.rs b/bindgen-tests/tests/expectations/tests/objc_template.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-9/objc_template.rs
rename to bindgen-tests/tests/expectations/tests/objc_template.rs
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/partial-specialization-and-inheritance.rs b/bindgen-tests/tests/expectations/tests/partial-specialization-and-inheritance.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/partial-specialization-and-inheritance.rs
rename to bindgen-tests/tests/expectations/tests/partial-specialization-and-inheritance.rs
diff --git a/bindgen-tests/tests/expectations/tests/redundant-packed-and-align.rs b/bindgen-tests/tests/expectations/tests/redundant-packed-and-align.rs
new file mode 100644
index 00000000..b5feaa14
--- /dev/null
+++ b/bindgen-tests/tests/expectations/tests/redundant-packed-and-align.rs
@@ -0,0 +1,369 @@
+#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+#[repr(C)]
+#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
+pub struct __BindgenBitfieldUnit<Storage> {
+    storage: Storage,
+}
+impl<Storage> __BindgenBitfieldUnit<Storage> {
+    #[inline]
+    pub const fn new(storage: Storage) -> Self {
+        Self { storage }
+    }
+}
+impl<Storage> __BindgenBitfieldUnit<Storage>
+where
+    Storage: AsRef<[u8]> + AsMut<[u8]>,
+{
+    #[inline]
+    pub fn get_bit(&self, index: usize) -> bool {
+        debug_assert!(index / 8 < self.storage.as_ref().len());
+        let byte_index = index / 8;
+        let byte = self.storage.as_ref()[byte_index];
+        let bit_index = if cfg!(target_endian = "big") {
+            7 - (index % 8)
+        } else {
+            index % 8
+        };
+        let mask = 1 << bit_index;
+        byte & mask == mask
+    }
+    #[inline]
+    pub fn set_bit(&mut self, index: usize, val: bool) {
+        debug_assert!(index / 8 < self.storage.as_ref().len());
+        let byte_index = index / 8;
+        let byte = &mut self.storage.as_mut()[byte_index];
+        let bit_index = if cfg!(target_endian = "big") {
+            7 - (index % 8)
+        } else {
+            index % 8
+        };
+        let mask = 1 << bit_index;
+        if val {
+            *byte |= mask;
+        } else {
+            *byte &= !mask;
+        }
+    }
+    #[inline]
+    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
+        debug_assert!(bit_width <= 64);
+        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
+        debug_assert!(
+            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
+        );
+        let mut val = 0;
+        for i in 0..(bit_width as usize) {
+            if self.get_bit(i + bit_offset) {
+                let index = if cfg!(target_endian = "big") {
+                    bit_width as usize - 1 - i
+                } else {
+                    i
+                };
+                val |= 1 << index;
+            }
+        }
+        val
+    }
+    #[inline]
+    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
+        debug_assert!(bit_width <= 64);
+        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
+        debug_assert!(
+            (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),
+        );
+        for i in 0..(bit_width as usize) {
+            let mask = 1 << i;
+            let val_bit_is_set = val & mask == mask;
+            let index = if cfg!(target_endian = "big") {
+                bit_width as usize - 1 - i
+            } else {
+                i
+            };
+            self.set_bit(index + bit_offset, val_bit_is_set);
+        }
+    }
+}
+#[repr(C)]
+#[repr(align(8))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct redundant_packed {
+    pub a: u32,
+    pub b: u32,
+}
+#[test]
+fn bindgen_test_layout_redundant_packed() {
+    const UNINIT: ::std::mem::MaybeUninit<redundant_packed> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(
+        ::std::mem::size_of::<redundant_packed>(),
+        8usize,
+        concat!("Size of: ", stringify!(redundant_packed)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<redundant_packed>(),
+        8usize,
+        concat!("Alignment of ", stringify!(redundant_packed)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(redundant_packed), "::", stringify!(a)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
+        4usize,
+        concat!("Offset of field: ", stringify!(redundant_packed), "::", stringify!(b)),
+    );
+}
+#[repr(C)]
+#[repr(align(8))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct redundant_packed_bitfield {
+    pub a: [u8; 3usize],
+    pub _bitfield_align_1: [u8; 0],
+    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+    pub c: u32,
+}
+#[test]
+fn bindgen_test_layout_redundant_packed_bitfield() {
+    const UNINIT: ::std::mem::MaybeUninit<redundant_packed_bitfield> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(
+        ::std::mem::size_of::<redundant_packed_bitfield>(),
+        8usize,
+        concat!("Size of: ", stringify!(redundant_packed_bitfield)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<redundant_packed_bitfield>(),
+        8usize,
+        concat!("Alignment of ", stringify!(redundant_packed_bitfield)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(redundant_packed_bitfield),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(redundant_packed_bitfield),
+            "::",
+            stringify!(c),
+        ),
+    );
+}
+impl redundant_packed_bitfield {
+    #[inline]
+    pub fn b0(&self) -> u8 {
+        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
+    }
+    #[inline]
+    pub fn set_b0(&mut self, val: u8) {
+        unsafe {
+            let val: u8 = ::std::mem::transmute(val);
+            self._bitfield_1.set(0usize, 1u8, val as u64)
+        }
+    }
+    #[inline]
+    pub fn b1(&self) -> u8 {
+        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
+    }
+    #[inline]
+    pub fn set_b1(&mut self, val: u8) {
+        unsafe {
+            let val: u8 = ::std::mem::transmute(val);
+            self._bitfield_1.set(1usize, 1u8, val as u64)
+        }
+    }
+    #[inline]
+    pub fn new_bitfield_1(b0: u8, b1: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+        __bindgen_bitfield_unit
+            .set(
+                0usize,
+                1u8,
+                {
+                    let b0: u8 = unsafe { ::std::mem::transmute(b0) };
+                    b0 as u64
+                },
+            );
+        __bindgen_bitfield_unit
+            .set(
+                1usize,
+                1u8,
+                {
+                    let b1: u8 = unsafe { ::std::mem::transmute(b1) };
+                    b1 as u64
+                },
+            );
+        __bindgen_bitfield_unit
+    }
+}
+#[repr(C)]
+#[repr(align(16))]
+#[derive(Copy, Clone)]
+pub union redundant_packed_union {
+    pub a: u64,
+    pub b: u32,
+}
+#[test]
+fn bindgen_test_layout_redundant_packed_union() {
+    const UNINIT: ::std::mem::MaybeUninit<redundant_packed_union> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(
+        ::std::mem::size_of::<redundant_packed_union>(),
+        16usize,
+        concat!("Size of: ", stringify!(redundant_packed_union)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<redundant_packed_union>(),
+        16usize,
+        concat!("Alignment of ", stringify!(redundant_packed_union)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(redundant_packed_union),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(redundant_packed_union),
+            "::",
+            stringify!(b),
+        ),
+    );
+}
+impl Default for redundant_packed_union {
+    fn default() -> Self {
+        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
+        unsafe {
+            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
+            s.assume_init()
+        }
+    }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct inner {
+    pub a: u8,
+}
+#[test]
+fn bindgen_test_layout_inner() {
+    const UNINIT: ::std::mem::MaybeUninit<inner> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(
+        ::std::mem::size_of::<inner>(),
+        2usize,
+        concat!("Size of: ", stringify!(inner)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<inner>(),
+        2usize,
+        concat!("Alignment of ", stringify!(inner)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(inner), "::", stringify!(a)),
+    );
+}
+#[repr(C)]
+#[repr(align(8))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct outer_redundant_packed {
+    pub a: [inner; 2usize],
+    pub b: u32,
+}
+#[test]
+fn bindgen_test_layout_outer_redundant_packed() {
+    const UNINIT: ::std::mem::MaybeUninit<outer_redundant_packed> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(
+        ::std::mem::size_of::<outer_redundant_packed>(),
+        8usize,
+        concat!("Size of: ", stringify!(outer_redundant_packed)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<outer_redundant_packed>(),
+        8usize,
+        concat!("Alignment of ", stringify!(outer_redundant_packed)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(outer_redundant_packed),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
+        4usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(outer_redundant_packed),
+            "::",
+            stringify!(b),
+        ),
+    );
+}
+#[repr(C)]
+#[repr(align(4))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct redundant_pragma_packed {
+    pub a: u8,
+    pub b: u16,
+}
+#[test]
+fn bindgen_test_layout_redundant_pragma_packed() {
+    const UNINIT: ::std::mem::MaybeUninit<redundant_pragma_packed> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
+    assert_eq!(
+        ::std::mem::size_of::<redundant_pragma_packed>(),
+        4usize,
+        concat!("Size of: ", stringify!(redundant_pragma_packed)),
+    );
+    assert_eq!(
+        ::std::mem::align_of::<redundant_pragma_packed>(),
+        4usize,
+        concat!("Alignment of ", stringify!(redundant_pragma_packed)),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(redundant_pragma_packed),
+            "::",
+            stringify!(a),
+        ),
+    );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
+        2usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(redundant_pragma_packed),
+            "::",
+            stringify!(b),
+        ),
+    );
+}
diff --git a/bindgen-tests/tests/expectations/tests/struct_typedef_ns.rs b/bindgen-tests/tests/expectations/tests/struct_typedef_ns.rs
index 44afa482..aabe23b1 100644
--- a/bindgen-tests/tests/expectations/tests/struct_typedef_ns.rs
+++ b/bindgen-tests/tests/expectations/tests/struct_typedef_ns.rs
@@ -47,41 +47,38 @@ pub mod root {
         use self::super::super::root;
         #[repr(C)]
         #[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
-        pub struct _bindgen_ty_1 {
+        pub struct typedef_struct {
             pub foo: ::std::os::raw::c_int,
         }
         #[test]
-        fn bindgen_test_layout__bindgen_ty_1() {
-            const UNINIT: ::std::mem::MaybeUninit<_bindgen_ty_1> = ::std::mem::MaybeUninit::uninit();
+        fn bindgen_test_layout_typedef_struct() {
+            const UNINIT: ::std::mem::MaybeUninit<typedef_struct> = ::std::mem::MaybeUninit::uninit();
             let ptr = UNINIT.as_ptr();
             assert_eq!(
-                ::std::mem::size_of::<_bindgen_ty_1>(),
+                ::std::mem::size_of::<typedef_struct>(),
                 4usize,
-                concat!("Size of: ", stringify!(_bindgen_ty_1)),
+                concat!("Size of: ", stringify!(typedef_struct)),
             );
             assert_eq!(
-                ::std::mem::align_of::<_bindgen_ty_1>(),
+                ::std::mem::align_of::<typedef_struct>(),
                 4usize,
-                concat!("Alignment of ", stringify!(_bindgen_ty_1)),
+                concat!("Alignment of ", stringify!(typedef_struct)),
             );
             assert_eq!(
                 unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize },
                 0usize,
                 concat!(
                     "Offset of field: ",
-                    stringify!(_bindgen_ty_1),
+                    stringify!(typedef_struct),
                     "::",
                     stringify!(foo),
                 ),
             );
         }
-        pub type typedef_struct = root::_bindgen_mod_id_12::_bindgen_ty_1;
-        pub const _bindgen_mod_id_12_BAR: root::_bindgen_mod_id_12::_bindgen_ty_2 = _bindgen_ty_2::BAR;
         #[repr(u32)]
         #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-        pub enum _bindgen_ty_2 {
+        pub enum typedef_enum {
             BAR = 1,
         }
-        pub use self::super::super::root::_bindgen_mod_id_12::_bindgen_ty_2 as typedef_enum;
     }
 }
diff --git a/bindgen-tests/tests/expectations/tests/libclang-5/type_alias_template_specialized.rs b/bindgen-tests/tests/expectations/tests/type_alias_template_specialized.rs
similarity index 100%
rename from bindgen-tests/tests/expectations/tests/libclang-5/type_alias_template_specialized.rs
rename to bindgen-tests/tests/expectations/tests/type_alias_template_specialized.rs
diff --git a/bindgen-tests/tests/expectations/tests/zero-sized-array.rs b/bindgen-tests/tests/expectations/tests/zero-sized-array.rs
index b0a1d3e5..bc4b6600 100644
--- a/bindgen-tests/tests/expectations/tests/zero-sized-array.rs
+++ b/bindgen-tests/tests/expectations/tests/zero-sized-array.rs
@@ -114,6 +114,8 @@ pub struct DynamicallySizedArray {
 }
 #[test]
 fn bindgen_test_layout_DynamicallySizedArray() {
+    const UNINIT: ::std::mem::MaybeUninit<DynamicallySizedArray> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<DynamicallySizedArray>(),
         0usize,
@@ -124,6 +126,16 @@ fn bindgen_test_layout_DynamicallySizedArray() {
         1usize,
         concat!("Alignment of ", stringify!(DynamicallySizedArray)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).arr) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(DynamicallySizedArray),
+            "::",
+            stringify!(arr),
+        ),
+    );
 }
 /// No `_address` field here either.
 #[repr(C)]
@@ -133,6 +145,8 @@ pub struct ContainsDynamicallySizedArray {
 }
 #[test]
 fn bindgen_test_layout_ContainsDynamicallySizedArray() {
+    const UNINIT: ::std::mem::MaybeUninit<ContainsDynamicallySizedArray> = ::std::mem::MaybeUninit::uninit();
+    let ptr = UNINIT.as_ptr();
     assert_eq!(
         ::std::mem::size_of::<ContainsDynamicallySizedArray>(),
         0usize,
@@ -143,4 +157,14 @@ fn bindgen_test_layout_ContainsDynamicallySizedArray() {
         1usize,
         concat!("Alignment of ", stringify!(ContainsDynamicallySizedArray)),
     );
+    assert_eq!(
+        unsafe { ::std::ptr::addr_of!((*ptr).dsa) as usize - ptr as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(ContainsDynamicallySizedArray),
+            "::",
+            stringify!(dsa),
+        ),
+    );
 }
diff --git a/bindgen-tests/tests/headers/blocklist-var.hpp b/bindgen-tests/tests/headers/blocklist-var.hpp
new file mode 100644
index 00000000..3c70e6f0
--- /dev/null
+++ b/bindgen-tests/tests/headers/blocklist-var.hpp
@@ -0,0 +1,3 @@
+// bindgen-flags: --blocklist-var should_be_blocked
+
+extern int should_be_blocked;
diff --git a/bindgen-tests/tests/headers/issue-544-stylo-creduce-2.hpp b/bindgen-tests/tests/headers/issue-544-stylo-creduce-2.hpp
index f3467f45..b41b422d 100644
--- a/bindgen-tests/tests/headers/issue-544-stylo-creduce-2.hpp
+++ b/bindgen-tests/tests/headers/issue-544-stylo-creduce-2.hpp
@@ -4,5 +4,12 @@ template <typename T>
 struct Foo {
     template <typename> using FirstAlias = typename T::Associated;
     template <typename U> using SecondAlias = Foo<FirstAlias<U>>;
+
+#if 0
+    // FIXME: This regressed sometime between libclang 9 and 16, though it
+    // never quite worked properly so...
     SecondAlias<int> member;
+#else
+    SecondAlias<int>* member;
+#endif
 };
diff --git a/bindgen-tests/tests/headers/redundant-packed-and-align.h b/bindgen-tests/tests/headers/redundant-packed-and-align.h
new file mode 100644
index 00000000..75e15e41
--- /dev/null
+++ b/bindgen-tests/tests/headers/redundant-packed-and-align.h
@@ -0,0 +1,42 @@
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+
+struct redundant_packed {
+    uint32_t a;
+    uint32_t b;
+} __attribute__((packed, aligned(8)));
+
+struct redundant_packed_bitfield {
+    uint8_t a[3];
+    uint8_t b0:1;
+    uint8_t b1:1;
+    uint32_t c;
+} __attribute__((packed, aligned(8)));
+
+
+union redundant_packed_union {
+    uint64_t a;
+    uint32_t b;
+} __attribute__((packed, aligned(16)));
+
+
+struct inner {
+    uint8_t a;
+} __attribute__((packed, aligned(2)));
+
+struct outer_redundant_packed {
+    struct inner a[2];
+    uint32_t b;
+} __attribute__((packed, aligned(8)));
+
+
+#pragma pack(2)
+
+struct redundant_pragma_packed {
+    uint8_t a;
+    uint16_t b;
+} __attribute__((aligned(4)));
+
+#pragma pack()
diff --git a/bindgen-tests/tests/stylo_sanity.rs b/bindgen-tests/tests/stylo_sanity.rs
index e1ad86b0..e9ec69bc 100755
--- a/bindgen-tests/tests/stylo_sanity.rs
+++ b/bindgen-tests/tests/stylo_sanity.rs
@@ -19,8 +19,8 @@ extern crate bindgen;
     feature = "__testing_only_extra_assertions",
 )))]
 #[cfg(any(
-    feature = "__testing_only_libclang_5",
-    feature = "__testing_only_libclang_9"
+    feature = "__testing_only_libclang_9",
+    feature = "__testing_only_libclang_16"
 ))]
 fn sanity_check_can_generate_stylo_bindings() {
     use std::time::Instant;
diff --git a/bindgen-tests/tests/tests.rs b/bindgen-tests/tests/tests.rs
index 1913b874..0e15155d 100644
--- a/bindgen-tests/tests/tests.rs
+++ b/bindgen-tests/tests/tests.rs
@@ -148,21 +148,19 @@ fn compare_generated_header(
     {
         let mut expectation = expectation.clone();
 
-        if cfg!(feature = "__testing_only_libclang_9") {
+        if cfg!(feature = "__testing_only_libclang_16") {
+            expectation.push("libclang-16");
+        } else if cfg!(feature = "__testing_only_libclang_9") {
             expectation.push("libclang-9");
-        } else if cfg!(feature = "__testing_only_libclang_5") {
-            expectation.push("libclang-5");
         } else {
             match clang_version().parsed {
-                None => expectation.push("libclang-9"),
+                None => expectation.push("libclang-16"),
                 Some(version) => {
                     let (maj, min) = version;
-                    let version_str = if maj >= 9 {
+                    let version_str = if maj >= 16 {
+                        "16".to_owned()
+                    } else if maj >= 9 {
                         "9".to_owned()
-                    } else if maj >= 5 {
-                        "5".to_owned()
-                    } else if maj >= 4 {
-                        "4".to_owned()
                     } else {
                         format!("{}.{}", maj, min)
                     };
@@ -392,7 +390,7 @@ fn test_clang_env_args() {
             "test.hpp",
             "#ifdef _ENV_ONE\nextern const int x[] = { 42 };\n#endif\n\
              #ifdef _ENV_TWO\nextern const int y[] = { 42 };\n#endif\n\
-             #ifdef NOT_THREE\nextern const int z[] = { 42 };\n#endif\n",
+             #if defined NOT_THREE && NOT_THREE == 1\nextern const int z[] = { 42 };\n#endif\n",
         )
         .generate()
         .unwrap()
@@ -474,6 +472,42 @@ fn test_multiple_header_calls_in_builder() {
     }
 }
 
+#[test]
+fn test_headers_call_in_builder() {
+    let actual = builder()
+        .headers([
+            concat!(env!("CARGO_MANIFEST_DIR"), "/tests/headers/func_ptr.h"),
+            concat!(env!("CARGO_MANIFEST_DIR"), "/tests/headers/char.h"),
+        ])
+        .clang_arg("--target=x86_64-unknown-linux")
+        .generate()
+        .unwrap()
+        .to_string();
+
+    let actual = format_code(actual).unwrap();
+
+    let expected_filename = concat!(
+        env!("CARGO_MANIFEST_DIR"),
+        "/tests/expectations/tests/test_multiple_header_calls_in_builder.rs"
+    );
+    let expected = include_str!(concat!(
+        env!("CARGO_MANIFEST_DIR"),
+        "/tests/expectations/tests/test_multiple_header_calls_in_builder.rs"
+    ));
+    let expected = format_code(expected).unwrap();
+
+    if actual != expected {
+        println!("Generated bindings differ from expected!");
+        error_diff_mismatch(
+            &actual,
+            &expected,
+            None,
+            Path::new(expected_filename),
+        )
+        .unwrap();
+    }
+}
+
 #[test]
 fn test_multiple_header_contents() {
     let actual = builder()
diff --git a/ci/test.sh b/ci/test.sh
index c0c8bec5..11e091f4 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -9,20 +9,22 @@ set -x
 set -o pipefail
 
 function llvm_linux_target_triple() {
-  echo "x86_64-linux-gnu-ubuntu-16.04"
+  case "$1" in
+    9.0.1)  echo "x86_64-linux-gnu-ubuntu-16.04" ;;
+    *)      echo "x86_64-linux-gnu-ubuntu-18.04" ;;
+  esac
 }
 
 function llvm_macos_target_triple() {
   case "$1" in
-    [0-8].* | 9.0.0)    echo "x86_64-darwin-apple" ;;
-    # Starting with 9.0.1, triple swapped ordering
-    *)                  echo "x86_64-apple-darwin" ;;
+    9.0.1)  echo "x86_64-apple-darwin" ;;
+    *)      echo "arm64-apple-darwin22.0" ;;
   esac
 }
 
 function llvm_version_triple() {
   case "$1" in
-    5.0) echo "5.0.1" ;;
+    9.0) echo "9.0.1" ;;
     # By default, take the .0 patch release
     *)   echo "$1.0"  ;;
   esac
@@ -30,16 +32,7 @@ function llvm_version_triple() {
 
 function llvm_base_url() {
   local llvm_version_triple=$1
-
-  case "$llvm_version_triple" in
-    [0-8].* | 9.0.0)
-      echo "http://releases.llvm.org/$llvm_version_triple"
-      ;;
-    # Starting with 9.0.1, releases are hosted on github
-    *)
-      echo "https://github.com/llvm/llvm-project/releases/download/llvmorg-$llvm_version_triple"
-      ;;
-  esac
+  echo "https://github.com/llvm/llvm-project/releases/download/llvmorg-$llvm_version_triple"
 }
 
 function llvm_download() {