Bug 1406952 - Update bindgen to fix x86 build bustage. r=jdm, a=ritu
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 16 Oct 2017 11:02:00 -0400
changeset 434937 6fa856a4da2f32f8178d30daa69d47528557b2af
parent 434936 fe7a664b11b7384ce5cf6c19dfaa7490ad352741
child 434938 f7d30f17af0defa3c530e6572368fe705aab3a1d
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm, ritu
bugs1406952
milestone57.0
Bug 1406952 - Update bindgen to fix x86 build bustage. r=jdm, a=ritu MozReview-Commit-ID: 2W7Me54sJ5W
servo/components/style/Cargo.toml
third_party/rust/bindgen-0.29.0/.cargo-checksum.json
third_party/rust/bindgen-0.29.0/.cargo-ok
third_party/rust/bindgen-0.29.0/.github/ISSUE_TEMPLATE.md
third_party/rust/bindgen-0.29.0/.travis.yml
third_party/rust/bindgen-0.29.0/CONTRIBUTING.md
third_party/rust/bindgen-0.29.0/Cargo.toml
third_party/rust/bindgen-0.29.0/LICENSE
third_party/rust/bindgen-0.29.0/README.md
third_party/rust/bindgen-0.29.0/appveyor.yml
third_party/rust/bindgen-0.29.0/book/book.toml
third_party/rust/bindgen-0.29.0/book/src/SUMMARY.md
third_party/rust/bindgen-0.29.0/book/src/blacklisting.md
third_party/rust/bindgen-0.29.0/book/src/chapter_1.md
third_party/rust/bindgen-0.29.0/book/src/command-line-usage.md
third_party/rust/bindgen-0.29.0/book/src/cpp.md
third_party/rust/bindgen-0.29.0/book/src/customizing-generated-bindings.md
third_party/rust/bindgen-0.29.0/book/src/introduction.md
third_party/rust/bindgen-0.29.0/book/src/library-usage.md
third_party/rust/bindgen-0.29.0/book/src/nocopy.md
third_party/rust/bindgen-0.29.0/book/src/opaque.md
third_party/rust/bindgen-0.29.0/book/src/replacing-types.md
third_party/rust/bindgen-0.29.0/book/src/requirements.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-0.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-1.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-2.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-3.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-4.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-5.md
third_party/rust/bindgen-0.29.0/book/src/tutorial-6.md
third_party/rust/bindgen-0.29.0/book/src/using-unions.md
third_party/rust/bindgen-0.29.0/book/src/whitelisting.md
third_party/rust/bindgen-0.29.0/build.rs
third_party/rust/bindgen-0.29.0/ci/assert-docs.sh
third_party/rust/bindgen-0.29.0/ci/assert-no-diff.bat
third_party/rust/bindgen-0.29.0/ci/assert-no-diff.sh
third_party/rust/bindgen-0.29.0/ci/assert-rustfmt.sh
third_party/rust/bindgen-0.29.0/ci/before_install.sh
third_party/rust/bindgen-0.29.0/ci/deploy-book.sh
third_party/rust/bindgen-0.29.0/ci/no-includes.sh
third_party/rust/bindgen-0.29.0/ci/test-book.sh
third_party/rust/bindgen-0.29.0/ci/test.bat
third_party/rust/bindgen-0.29.0/ci/test.sh
third_party/rust/bindgen-0.29.0/example-graphviz-ir.png
third_party/rust/bindgen-0.29.0/rustfmt.toml
third_party/rust/bindgen-0.29.0/src/callbacks.rs
third_party/rust/bindgen-0.29.0/src/clang.rs
third_party/rust/bindgen-0.29.0/src/codegen/error.rs
third_party/rust/bindgen-0.29.0/src/codegen/helpers.rs
third_party/rust/bindgen-0.29.0/src/codegen/mod.rs
third_party/rust/bindgen-0.29.0/src/codegen/struct_layout.rs
third_party/rust/bindgen-0.29.0/src/extra_assertions.rs
third_party/rust/bindgen-0.29.0/src/ir/analysis/derive_debug.rs
third_party/rust/bindgen-0.29.0/src/ir/analysis/has_vtable.rs
third_party/rust/bindgen-0.29.0/src/ir/analysis/mod.rs
third_party/rust/bindgen-0.29.0/src/ir/analysis/template_params.rs
third_party/rust/bindgen-0.29.0/src/ir/annotations.rs
third_party/rust/bindgen-0.29.0/src/ir/comment.rs
third_party/rust/bindgen-0.29.0/src/ir/comp.rs
third_party/rust/bindgen-0.29.0/src/ir/context.rs
third_party/rust/bindgen-0.29.0/src/ir/derive.rs
third_party/rust/bindgen-0.29.0/src/ir/dot.rs
third_party/rust/bindgen-0.29.0/src/ir/enum_ty.rs
third_party/rust/bindgen-0.29.0/src/ir/function.rs
third_party/rust/bindgen-0.29.0/src/ir/int.rs
third_party/rust/bindgen-0.29.0/src/ir/item.rs
third_party/rust/bindgen-0.29.0/src/ir/item_kind.rs
third_party/rust/bindgen-0.29.0/src/ir/layout.rs
third_party/rust/bindgen-0.29.0/src/ir/mod.rs
third_party/rust/bindgen-0.29.0/src/ir/module.rs
third_party/rust/bindgen-0.29.0/src/ir/objc.rs
third_party/rust/bindgen-0.29.0/src/ir/template.rs
third_party/rust/bindgen-0.29.0/src/ir/traversal.rs
third_party/rust/bindgen-0.29.0/src/ir/ty.rs
third_party/rust/bindgen-0.29.0/src/ir/var.rs
third_party/rust/bindgen-0.29.0/src/lib.rs
third_party/rust/bindgen-0.29.0/src/log_stubs.rs
third_party/rust/bindgen-0.29.0/src/main.rs
third_party/rust/bindgen-0.29.0/src/options.rs
third_party/rust/bindgen-0.29.0/src/parse.rs
third_party/rust/bindgen-0.29.0/src/regex_set.rs
third_party/rust/bindgen-0.29.0/src/uses.rs
third_party/rust/bindgen-0.29.1/.cargo-checksum.json
third_party/rust/bindgen-0.29.1/.cargo-ok
third_party/rust/bindgen-0.29.1/.github/ISSUE_TEMPLATE.md
third_party/rust/bindgen-0.29.1/.travis.yml
third_party/rust/bindgen-0.29.1/CONTRIBUTING.md
third_party/rust/bindgen-0.29.1/Cargo.toml
third_party/rust/bindgen-0.29.1/LICENSE
third_party/rust/bindgen-0.29.1/README.md
third_party/rust/bindgen-0.29.1/appveyor.yml
third_party/rust/bindgen-0.29.1/book/book.toml
third_party/rust/bindgen-0.29.1/book/src/SUMMARY.md
third_party/rust/bindgen-0.29.1/book/src/blacklisting.md
third_party/rust/bindgen-0.29.1/book/src/chapter_1.md
third_party/rust/bindgen-0.29.1/book/src/command-line-usage.md
third_party/rust/bindgen-0.29.1/book/src/cpp.md
third_party/rust/bindgen-0.29.1/book/src/customizing-generated-bindings.md
third_party/rust/bindgen-0.29.1/book/src/introduction.md
third_party/rust/bindgen-0.29.1/book/src/library-usage.md
third_party/rust/bindgen-0.29.1/book/src/nocopy.md
third_party/rust/bindgen-0.29.1/book/src/opaque.md
third_party/rust/bindgen-0.29.1/book/src/replacing-types.md
third_party/rust/bindgen-0.29.1/book/src/requirements.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-0.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-1.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-2.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-3.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-4.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-5.md
third_party/rust/bindgen-0.29.1/book/src/tutorial-6.md
third_party/rust/bindgen-0.29.1/book/src/using-unions.md
third_party/rust/bindgen-0.29.1/book/src/whitelisting.md
third_party/rust/bindgen-0.29.1/build.rs
third_party/rust/bindgen-0.29.1/ci/assert-docs.sh
third_party/rust/bindgen-0.29.1/ci/assert-no-diff.bat
third_party/rust/bindgen-0.29.1/ci/assert-no-diff.sh
third_party/rust/bindgen-0.29.1/ci/assert-rustfmt.sh
third_party/rust/bindgen-0.29.1/ci/before_install.sh
third_party/rust/bindgen-0.29.1/ci/deploy-book.sh
third_party/rust/bindgen-0.29.1/ci/no-includes.sh
third_party/rust/bindgen-0.29.1/ci/test-book.sh
third_party/rust/bindgen-0.29.1/ci/test.bat
third_party/rust/bindgen-0.29.1/ci/test.sh
third_party/rust/bindgen-0.29.1/example-graphviz-ir.png
third_party/rust/bindgen-0.29.1/rustfmt.toml
third_party/rust/bindgen-0.29.1/src/callbacks.rs
third_party/rust/bindgen-0.29.1/src/clang.rs
third_party/rust/bindgen-0.29.1/src/codegen/error.rs
third_party/rust/bindgen-0.29.1/src/codegen/helpers.rs
third_party/rust/bindgen-0.29.1/src/codegen/mod.rs
third_party/rust/bindgen-0.29.1/src/codegen/struct_layout.rs
third_party/rust/bindgen-0.29.1/src/extra_assertions.rs
third_party/rust/bindgen-0.29.1/src/ir/analysis/derive_debug.rs
third_party/rust/bindgen-0.29.1/src/ir/analysis/has_vtable.rs
third_party/rust/bindgen-0.29.1/src/ir/analysis/mod.rs
third_party/rust/bindgen-0.29.1/src/ir/analysis/template_params.rs
third_party/rust/bindgen-0.29.1/src/ir/annotations.rs
third_party/rust/bindgen-0.29.1/src/ir/comment.rs
third_party/rust/bindgen-0.29.1/src/ir/comp.rs
third_party/rust/bindgen-0.29.1/src/ir/context.rs
third_party/rust/bindgen-0.29.1/src/ir/derive.rs
third_party/rust/bindgen-0.29.1/src/ir/dot.rs
third_party/rust/bindgen-0.29.1/src/ir/enum_ty.rs
third_party/rust/bindgen-0.29.1/src/ir/function.rs
third_party/rust/bindgen-0.29.1/src/ir/int.rs
third_party/rust/bindgen-0.29.1/src/ir/item.rs
third_party/rust/bindgen-0.29.1/src/ir/item_kind.rs
third_party/rust/bindgen-0.29.1/src/ir/layout.rs
third_party/rust/bindgen-0.29.1/src/ir/mod.rs
third_party/rust/bindgen-0.29.1/src/ir/module.rs
third_party/rust/bindgen-0.29.1/src/ir/objc.rs
third_party/rust/bindgen-0.29.1/src/ir/template.rs
third_party/rust/bindgen-0.29.1/src/ir/traversal.rs
third_party/rust/bindgen-0.29.1/src/ir/ty.rs
third_party/rust/bindgen-0.29.1/src/ir/var.rs
third_party/rust/bindgen-0.29.1/src/lib.rs
third_party/rust/bindgen-0.29.1/src/log_stubs.rs
third_party/rust/bindgen-0.29.1/src/main.rs
third_party/rust/bindgen-0.29.1/src/options.rs
third_party/rust/bindgen-0.29.1/src/parse.rs
third_party/rust/bindgen-0.29.1/src/regex_set.rs
third_party/rust/bindgen-0.29.1/src/uses.rs
third_party/rust/clang-sys-0.19.0/.cargo-checksum.json
third_party/rust/clang-sys-0.19.0/.cargo-ok
third_party/rust/clang-sys-0.19.0/.travis.yml
third_party/rust/clang-sys-0.19.0/CHANGELOG.md
third_party/rust/clang-sys-0.19.0/CONTRIBUTING.md
third_party/rust/clang-sys-0.19.0/Cargo.toml
third_party/rust/clang-sys-0.19.0/LICENSE.txt
third_party/rust/clang-sys-0.19.0/README.md
third_party/rust/clang-sys-0.19.0/appveyor.yml
third_party/rust/clang-sys-0.19.0/build.rs
third_party/rust/clang-sys-0.19.0/ci/before_install.sh
third_party/rust/clang-sys-0.19.0/ci/install.bat
third_party/rust/clang-sys-0.19.0/ci/script.sh
third_party/rust/clang-sys-0.19.0/ci/test_script.bat
third_party/rust/clang-sys-0.19.0/clippy.toml
third_party/rust/clang-sys-0.19.0/src/lib.rs
third_party/rust/clang-sys-0.19.0/src/link.rs
third_party/rust/clang-sys-0.19.0/src/support.rs
third_party/rust/clang-sys-0.19.0/tests/header.h
third_party/rust/clang-sys-0.19.0/tests/lib.rs
third_party/rust/clang-sys/.cargo-checksum.json
third_party/rust/clang-sys/.travis.yml
third_party/rust/clang-sys/CHANGELOG.md
third_party/rust/clang-sys/Cargo.toml
third_party/rust/clang-sys/README.md
third_party/rust/clang-sys/appveyor.yml
third_party/rust/clang-sys/build.rs
third_party/rust/clang-sys/ci/before_install.sh
third_party/rust/clang-sys/ci/script.sh
third_party/rust/clang-sys/src/lib.rs
third_party/rust/clang-sys/src/link.rs
third_party/rust/clang-sys/src/support.rs
third_party/rust/clang-sys/tests/lib.rs
toolkit/library/gtest/rust/Cargo.lock
toolkit/library/rust/Cargo.lock
--- a/servo/components/style/Cargo.toml
+++ b/servo/components/style/Cargo.toml
@@ -78,12 +78,12 @@ unicode-bidi = "0.3"
 unicode-segmentation = "1.0"
 
 [target.'cfg(windows)'.dependencies]
 kernel32-sys = "0.2"
 
 [build-dependencies]
 lazy_static = "0.2"
 log = "0.3"
-bindgen = { version = "0.29", optional = true }
+bindgen = { version = "0.29.1", optional = true }
 regex = {version = "0.2", optional = true}
 walkdir = "1.0"
 toml = {version = "0.2.1", optional = true, default-features = false}
rename from third_party/rust/bindgen-0.29.0/.cargo-checksum.json
rename to third_party/rust/bindgen-0.29.1/.cargo-checksum.json
--- a/third_party/rust/bindgen-0.29.0/.cargo-checksum.json
+++ b/third_party/rust/bindgen-0.29.1/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".github/ISSUE_TEMPLATE.md":"952c59a2801c6e204801585704469db1af23cade4019281ba8d6027c0a03c553",".travis.yml":"fe5a4cd14f10c5d5c39ad6e22500cd0b68cfa1a5beb625d01577610100a9dfeb","CONTRIBUTING.md":"bef289580b237a158170335a998ab5d77f4e620424ce3636b0cf9fde181b1aaa","Cargo.toml":"bbae95802d3e7044687bef057a47777b409ed898cf370a40de52cb6821263a27","LICENSE":"1d2e4bdb9d94ab020e9550136cae9ec73fc699c3c96a9d98078c542e9b93d294","README.md":"8c4662f1c596d52d134cf5fa628655dc81b4259fb8e5349062eb36626d009efe","appveyor.yml":"6648e724bf3f5981ea0aa299417b3980a6dd1134cabd2ed34072759b70063d1b","book/book.toml":"dbf931141036d1d0eb02b326f7f5d7867dd9a8f0fc49b66b8fd97e9873c08e44","book/src/SUMMARY.md":"471d2494f28b4c9c40e004ec7190479345ee2d29247b712726d8820234172dd6","book/src/blacklisting.md":"a68424cc3643e06e83c5ea4efd5eb501dc64229ff9f4286b9a210a2376c20a9b","book/src/chapter_1.md":"cac4f4a3609ec22eb519b0e07d1d1bdc15ac3d741f29f9b97280f700b96ded66","book/src/command-line-usage.md":"9e3ae32cb5d893f1a93fc539149950bacdf43a18c694169fa45dfe8080617403","book/src/cpp.md":"c7926268d311239caa4475602634d609553d4a8a0e0902fcbd1762d1d405f657","book/src/customizing-generated-bindings.md":"0363ca69719c5e24d624ac3adfef71445896d3ed2b7bb3689c7905e47bdd9cdd","book/src/introduction.md":"c1b11894292f326fa492534c5a9a58b0238d05caccb3e145b70b226069ee674e","book/src/library-usage.md":"62565cf21a6b07a9de9a3f525427e75aa0f05350a1f546ed428c8a6c40cf850c","book/src/nocopy.md":"615f9b2ae474adf32ddf49e2f29f019f857db0fbb3232ed30df3960edd9f3406","book/src/opaque.md":"d6a5d6b7dfad4e8e1f7a1307f57a0a4b723032970bbae0e1290e1ab81e08b21a","book/src/replacing-types.md":"f406f7135299cd4e67a017237a6a9acbe936aa48f37b7f52be2769c90537b73f","book/src/requirements.md":"f6715430e9830593501a9b8c09105058189832df1a0b4d9852400fa408069f0e","book/src/tutorial-0.md":"0343285deac4161a230450ab8e9aa825d2a42f243cb10372b2d0edef8b956c29","book/src/tutorial-1.md":"c341e519ff6f2abb55e63139e106e3161c5169b2154bf694cd9c34c7feb3a89e","book/src/tutorial-2.md":"f6c9cf4ea8e38628c15dedc0ee7f60055a2aa841e95f972465d2932bb71878ad","book/src/tutorial-3.md":"580d25d9754d540af2b7d3eb99a828555479c37a61566e21eec9a00f98f829c3","book/src/tutorial-4.md":"23e82ec5d2de96670e148e5417b61810c203603adea54aefc94a2b16d1d0ede2","book/src/tutorial-5.md":"60e7f50e9be3c7de0e096f6615815d74608afa184c649b4301d71a60c808c646","book/src/tutorial-6.md":"806238e5156b10881489bda6c5480e9bd0aa88208ef2d74dd26c18cd3d024dff","book/src/using-unions.md":"bcd0f5f97a199ac84df4cd4a43dc6ca17d5eff6493b90247f3425b9c2c68c1ff","book/src/whitelisting.md":"b6913e3fc43d28f504331afe4ccc3607caad9aa88d4cb627a86bdc1e72ea0175","build.rs":"5e44ce645edcd487efae5e127efe289d1216c7f55dce65d26248f61f5dde4a3a","ci/assert-docs.sh":"f60a78a7d6f6444389df39a070a08851c78f1b525afff3b2548e852a3ebf6dc6","ci/assert-no-diff.bat":"904a49de6ee9faf8b83cc21d958d2fb37d4b278e9fe48484320aa55f9089f032","ci/assert-no-diff.sh":"af208c40d412e2bce82ae9b4a4e52cae4ae0b4beef9f93eb825bf5d5346a70b2","ci/assert-rustfmt.sh":"b9c810e86ea6d71bce1d6bf8d896839cfe2c198338e042ebc744b75e83af1126","ci/before_install.sh":"51409851cf4e1dee27735461e77247c599e023259c3a57e82fa044f284ca8e87","ci/deploy-book.sh":"67a3df2cc39ee585a2d5353d303e452d9586bec7ea33de6b5aa4a0ecb43c136f","ci/no-includes.sh":"148b146eab4aeb11ad229e03b3d5ebd8cb56a31674df438264d1ebff2d17f52d","ci/test-book.sh":"dfbcfb1381f723b4b29634bb4033ab72ace412d0711631976897c64d57122600","ci/test.bat":"88368377f3907eb34b3693a5ddf8ff69168b17bcc6528807aaf52dc693cb3c47","ci/test.sh":"01059bf60d40053534f9606986d3f4e06e90262848c4b3114df62b7b90f84793","example-graphviz-ir.png":"e1122ab33b4c80e8c9c0cf8abea404c1192f9b2eef97f5766e86103cc95d5e01","rustfmt.toml":"c4f3b593bdd634590df22aaf7b0872244d5c2169aacd0274a05e4aca4708a8d3","src/callbacks.rs":"e0d36d30adac8a4eaab64f0a9df0ab29026fcd5f5c5588bdeb2ad762e4c024ad","src/clang.rs":"79ffe98ef68e889731e1babf63157b75587e81faf96d97ce7e8be48377bfe77e","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"501838ff8da3c51c90eefdbee0228e321782e755201147b0d8ed78c2f59b29d1","src/codegen/mod.rs":"1f7ae949d425e3724f62de144b483f0f4257c02071ca00623798170b5dbf9745","src/codegen/struct_layout.rs":"130cf8a2e1cb8348a13e05904af2300333b51bf72cd63f3ec696b768a4a6b52d","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/ir/analysis/derive_debug.rs":"18c9c16f233c2dabed9b5d85a07c2e6c884b318336996d217e1a6b14b023a54a","src/ir/analysis/has_vtable.rs":"6f49e17b1b40f8683d21a89725aec48f9fe4417361a55cf302e568eecbe2d35d","src/ir/analysis/mod.rs":"5758a40600e19278bb7dc4238f7e490971fa5aa83ade9497924fd722da9bf315","src/ir/analysis/template_params.rs":"b74243aab14f50d8a765d9e30f48e8c58ba340e4b4bfb7db9c87f1123842e3aa","src/ir/annotations.rs":"887ad7beaa43eddd60337b67951a109c2e7f51cb8e757b35cad45f744b7ba919","src/ir/comment.rs":"564a9fbf4bd7bf03ecf93104109ef66ed501abeaf4e4784b1d14083df6cade3b","src/ir/comp.rs":"5146cede0fdc3747c4ab12b4665d39b8ab482c0308577582013d878dee595b5f","src/ir/context.rs":"f8cfdaf8f53811eebfe52b9966b70a3780f12ca2baebce08e393178622d108ac","src/ir/derive.rs":"e4e86d86edc957eb38d310852e49e1a160bf4fdd13a70a664373c8a343705b62","src/ir/dot.rs":"79af769bff3b7c8b5c58ee73286429bcc8b9963526e42257cc61ca9a2a5eb4e9","src/ir/enum_ty.rs":"64ec618b9914aac83351624ffb9219e089dafa2959b4e896160f7f30df9e29c4","src/ir/function.rs":"bf374db02a5086b0dfd91fbc17d0b283cb057857dd13d5d9fde1dbd33aad47ef","src/ir/int.rs":"b7bc19668ca6c7c084a3f8d1e07d5a980ee49c0c9a8882c3e72baab4ea7fa403","src/ir/item.rs":"136bd52e1179349c24202d2745330d29d1ad9d1afe891cf149475ba1d6cf8d07","src/ir/item_kind.rs":"64b8b5bede6dfe950ceb15da1aabf888707eeb5883df9213f05ee47797bfb84f","src/ir/layout.rs":"58df6436c7170ab7b2bde2afe4760f6dfc35a6ef3edb50290fbd3a8ea0248453","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"5f33c7bd01891ece61d946c6052b96a8127e3811616f3e698fc220716234ca6c","src/ir/objc.rs":"353be93027d74ad102ac3b0ef8754dd1258a400dcf7d361fa224fdf1ab973c56","src/ir/template.rs":"5650b957ceff3caef4d75ad5c1e5014a07ae3ccb6edd1712babbd543e192f20a","src/ir/traversal.rs":"1b9abed7bcc82f85c18d36dd475a5615984ff00588468ab81f232902f93ec423","src/ir/ty.rs":"8550883f2f65b4e113fc7beefcd5f6e1d701a9e58cc92bae4356d6eeadd69727","src/ir/var.rs":"0b56e6107bf96063c6a9bcb47fcbd1950147d63d242185498e95242174f083d6","src/lib.rs":"ca18b1e54f8be6c32030c15444f52556758e0b5c0e5048ad9389aa1cbffabd95","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"995b35df006ba97d882aa6de91ba42a616314a98687a2ea4f8bbff0669a54f54","src/options.rs":"a0ecd0eb1069df3af236fb5e9a9c9611ed1949321243aaee9e4e257c72ffd8c2","src/parse.rs":"6d88e1dcdb4e99f4f65629ce205c14e18097773bc938973f8e3849ba3bda4f79","src/regex_set.rs":"6c46877238c338e1fc6a35a8983db21f0711c979e44310975f60ad73a50fdbbc","src/uses.rs":"16841e43290424f814a4cb119b782f6987e854429f483ae8001525e3f3620958"},"package":"0c338079dafc81bef7d581f494b906603d12359c4306979eae6ca081925a4984"}
\ No newline at end of file
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".github/ISSUE_TEMPLATE.md":"952c59a2801c6e204801585704469db1af23cade4019281ba8d6027c0a03c553",".travis.yml":"fe5a4cd14f10c5d5c39ad6e22500cd0b68cfa1a5beb625d01577610100a9dfeb","CONTRIBUTING.md":"bef289580b237a158170335a998ab5d77f4e620424ce3636b0cf9fde181b1aaa","Cargo.toml":"028744c0bc058ca6971a4b04dcc85fba22bad47bed5f9f244f5b3b4005dee7d7","LICENSE":"1d2e4bdb9d94ab020e9550136cae9ec73fc699c3c96a9d98078c542e9b93d294","README.md":"8c4662f1c596d52d134cf5fa628655dc81b4259fb8e5349062eb36626d009efe","appveyor.yml":"6648e724bf3f5981ea0aa299417b3980a6dd1134cabd2ed34072759b70063d1b","book/book.toml":"dbf931141036d1d0eb02b326f7f5d7867dd9a8f0fc49b66b8fd97e9873c08e44","book/src/SUMMARY.md":"471d2494f28b4c9c40e004ec7190479345ee2d29247b712726d8820234172dd6","book/src/blacklisting.md":"a68424cc3643e06e83c5ea4efd5eb501dc64229ff9f4286b9a210a2376c20a9b","book/src/chapter_1.md":"cac4f4a3609ec22eb519b0e07d1d1bdc15ac3d741f29f9b97280f700b96ded66","book/src/command-line-usage.md":"9e3ae32cb5d893f1a93fc539149950bacdf43a18c694169fa45dfe8080617403","book/src/cpp.md":"c7926268d311239caa4475602634d609553d4a8a0e0902fcbd1762d1d405f657","book/src/customizing-generated-bindings.md":"0363ca69719c5e24d624ac3adfef71445896d3ed2b7bb3689c7905e47bdd9cdd","book/src/introduction.md":"c1b11894292f326fa492534c5a9a58b0238d05caccb3e145b70b226069ee674e","book/src/library-usage.md":"62565cf21a6b07a9de9a3f525427e75aa0f05350a1f546ed428c8a6c40cf850c","book/src/nocopy.md":"615f9b2ae474adf32ddf49e2f29f019f857db0fbb3232ed30df3960edd9f3406","book/src/opaque.md":"d6a5d6b7dfad4e8e1f7a1307f57a0a4b723032970bbae0e1290e1ab81e08b21a","book/src/replacing-types.md":"f406f7135299cd4e67a017237a6a9acbe936aa48f37b7f52be2769c90537b73f","book/src/requirements.md":"f6715430e9830593501a9b8c09105058189832df1a0b4d9852400fa408069f0e","book/src/tutorial-0.md":"0343285deac4161a230450ab8e9aa825d2a42f243cb10372b2d0edef8b956c29","book/src/tutorial-1.md":"c341e519ff6f2abb55e63139e106e3161c5169b2154bf694cd9c34c7feb3a89e","book/src/tutorial-2.md":"f6c9cf4ea8e38628c15dedc0ee7f60055a2aa841e95f972465d2932bb71878ad","book/src/tutorial-3.md":"580d25d9754d540af2b7d3eb99a828555479c37a61566e21eec9a00f98f829c3","book/src/tutorial-4.md":"23e82ec5d2de96670e148e5417b61810c203603adea54aefc94a2b16d1d0ede2","book/src/tutorial-5.md":"60e7f50e9be3c7de0e096f6615815d74608afa184c649b4301d71a60c808c646","book/src/tutorial-6.md":"806238e5156b10881489bda6c5480e9bd0aa88208ef2d74dd26c18cd3d024dff","book/src/using-unions.md":"bcd0f5f97a199ac84df4cd4a43dc6ca17d5eff6493b90247f3425b9c2c68c1ff","book/src/whitelisting.md":"b6913e3fc43d28f504331afe4ccc3607caad9aa88d4cb627a86bdc1e72ea0175","build.rs":"5e44ce645edcd487efae5e127efe289d1216c7f55dce65d26248f61f5dde4a3a","ci/assert-docs.sh":"f60a78a7d6f6444389df39a070a08851c78f1b525afff3b2548e852a3ebf6dc6","ci/assert-no-diff.bat":"904a49de6ee9faf8b83cc21d958d2fb37d4b278e9fe48484320aa55f9089f032","ci/assert-no-diff.sh":"af208c40d412e2bce82ae9b4a4e52cae4ae0b4beef9f93eb825bf5d5346a70b2","ci/assert-rustfmt.sh":"b9c810e86ea6d71bce1d6bf8d896839cfe2c198338e042ebc744b75e83af1126","ci/before_install.sh":"51409851cf4e1dee27735461e77247c599e023259c3a57e82fa044f284ca8e87","ci/deploy-book.sh":"67a3df2cc39ee585a2d5353d303e452d9586bec7ea33de6b5aa4a0ecb43c136f","ci/no-includes.sh":"148b146eab4aeb11ad229e03b3d5ebd8cb56a31674df438264d1ebff2d17f52d","ci/test-book.sh":"dfbcfb1381f723b4b29634bb4033ab72ace412d0711631976897c64d57122600","ci/test.bat":"88368377f3907eb34b3693a5ddf8ff69168b17bcc6528807aaf52dc693cb3c47","ci/test.sh":"01059bf60d40053534f9606986d3f4e06e90262848c4b3114df62b7b90f84793","example-graphviz-ir.png":"e1122ab33b4c80e8c9c0cf8abea404c1192f9b2eef97f5766e86103cc95d5e01","rustfmt.toml":"c4f3b593bdd634590df22aaf7b0872244d5c2169aacd0274a05e4aca4708a8d3","src/callbacks.rs":"e0d36d30adac8a4eaab64f0a9df0ab29026fcd5f5c5588bdeb2ad762e4c024ad","src/clang.rs":"79ffe98ef68e889731e1babf63157b75587e81faf96d97ce7e8be48377bfe77e","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"501838ff8da3c51c90eefdbee0228e321782e755201147b0d8ed78c2f59b29d1","src/codegen/mod.rs":"1f7ae949d425e3724f62de144b483f0f4257c02071ca00623798170b5dbf9745","src/codegen/struct_layout.rs":"130cf8a2e1cb8348a13e05904af2300333b51bf72cd63f3ec696b768a4a6b52d","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/ir/analysis/derive_debug.rs":"18c9c16f233c2dabed9b5d85a07c2e6c884b318336996d217e1a6b14b023a54a","src/ir/analysis/has_vtable.rs":"6f49e17b1b40f8683d21a89725aec48f9fe4417361a55cf302e568eecbe2d35d","src/ir/analysis/mod.rs":"5758a40600e19278bb7dc4238f7e490971fa5aa83ade9497924fd722da9bf315","src/ir/analysis/template_params.rs":"b74243aab14f50d8a765d9e30f48e8c58ba340e4b4bfb7db9c87f1123842e3aa","src/ir/annotations.rs":"887ad7beaa43eddd60337b67951a109c2e7f51cb8e757b35cad45f744b7ba919","src/ir/comment.rs":"564a9fbf4bd7bf03ecf93104109ef66ed501abeaf4e4784b1d14083df6cade3b","src/ir/comp.rs":"5146cede0fdc3747c4ab12b4665d39b8ab482c0308577582013d878dee595b5f","src/ir/context.rs":"f8cfdaf8f53811eebfe52b9966b70a3780f12ca2baebce08e393178622d108ac","src/ir/derive.rs":"e4e86d86edc957eb38d310852e49e1a160bf4fdd13a70a664373c8a343705b62","src/ir/dot.rs":"79af769bff3b7c8b5c58ee73286429bcc8b9963526e42257cc61ca9a2a5eb4e9","src/ir/enum_ty.rs":"64ec618b9914aac83351624ffb9219e089dafa2959b4e896160f7f30df9e29c4","src/ir/function.rs":"bf374db02a5086b0dfd91fbc17d0b283cb057857dd13d5d9fde1dbd33aad47ef","src/ir/int.rs":"b7bc19668ca6c7c084a3f8d1e07d5a980ee49c0c9a8882c3e72baab4ea7fa403","src/ir/item.rs":"136bd52e1179349c24202d2745330d29d1ad9d1afe891cf149475ba1d6cf8d07","src/ir/item_kind.rs":"64b8b5bede6dfe950ceb15da1aabf888707eeb5883df9213f05ee47797bfb84f","src/ir/layout.rs":"58df6436c7170ab7b2bde2afe4760f6dfc35a6ef3edb50290fbd3a8ea0248453","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"5f33c7bd01891ece61d946c6052b96a8127e3811616f3e698fc220716234ca6c","src/ir/objc.rs":"353be93027d74ad102ac3b0ef8754dd1258a400dcf7d361fa224fdf1ab973c56","src/ir/template.rs":"5650b957ceff3caef4d75ad5c1e5014a07ae3ccb6edd1712babbd543e192f20a","src/ir/traversal.rs":"1b9abed7bcc82f85c18d36dd475a5615984ff00588468ab81f232902f93ec423","src/ir/ty.rs":"8550883f2f65b4e113fc7beefcd5f6e1d701a9e58cc92bae4356d6eeadd69727","src/ir/var.rs":"0b56e6107bf96063c6a9bcb47fcbd1950147d63d242185498e95242174f083d6","src/lib.rs":"7bbb87d1bf39a723edfb9a39d4d52ce7937ec42c1dcaf29b1068171ab83cbfd1","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"995b35df006ba97d882aa6de91ba42a616314a98687a2ea4f8bbff0669a54f54","src/options.rs":"a0ecd0eb1069df3af236fb5e9a9c9611ed1949321243aaee9e4e257c72ffd8c2","src/parse.rs":"6d88e1dcdb4e99f4f65629ce205c14e18097773bc938973f8e3849ba3bda4f79","src/regex_set.rs":"6c46877238c338e1fc6a35a8983db21f0711c979e44310975f60ad73a50fdbbc","src/uses.rs":"16841e43290424f814a4cb119b782f6987e854429f483ae8001525e3f3620958"},"package":"ba610cba0c1727ed837316540068b51349b8268c073906067b7c3948598929bd"}
\ No newline at end of file
rename from third_party/rust/bindgen-0.29.0/.cargo-ok
rename to third_party/rust/bindgen-0.29.1/.cargo-ok
rename from third_party/rust/bindgen-0.29.0/.github/ISSUE_TEMPLATE.md
rename to third_party/rust/bindgen-0.29.1/.github/ISSUE_TEMPLATE.md
rename from third_party/rust/bindgen-0.29.0/.travis.yml
rename to third_party/rust/bindgen-0.29.1/.travis.yml
rename from third_party/rust/bindgen-0.29.0/CONTRIBUTING.md
rename to third_party/rust/bindgen-0.29.1/CONTRIBUTING.md
rename from third_party/rust/bindgen-0.29.0/Cargo.toml
rename to third_party/rust/bindgen-0.29.1/Cargo.toml
--- a/third_party/rust/bindgen-0.29.0/Cargo.toml
+++ b/third_party/rust/bindgen-0.29.1/Cargo.toml
@@ -7,17 +7,17 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "bindgen"
-version = "0.29.0"
+version = "0.29.1"
 authors = ["Jyun-Yan You <jyyou.tw@gmail.com>", "Emilio Cobos Álvarez <emilio@crisal.io>", "Nick Fitzgerald <fitzgen@gmail.com>", "The Servo project developers"]
 build = "build.rs"
 exclude = ["bindgen-integration", "ci", "tests/**", "*.orig"]
 description = "Automatically generates Rust FFI bindings to C and C++ libraries."
 documentation = "https://docs.rs/bindgen"
 readme = "README.md"
 keywords = ["bindings", "ffi", "code-generation"]
 categories = ["external-ffi-bindings", "development-tools::ffi"]
@@ -26,70 +26,70 @@ repository = "https://github.com/rust-la
 
 [lib]
 path = "src/lib.rs"
 
 [[bin]]
 name = "bindgen"
 path = "src/main.rs"
 doc = false
-[dependencies.clap]
-version = "2"
-
-[dependencies.peeking_take_while]
-version = "0.1.2"
-
-[dependencies.cfg-if]
-version = "0.1.0"
-
-[dependencies.regex]
-version = "0.2"
-
-[dependencies.clang-sys]
-version = "0.19.0"
-features = ["runtime", "clang_3_9"]
-
-[dependencies.lazy_static]
-version = "0.2.1"
-
 [dependencies.syntex_syntax]
 version = "0.58"
 
 [dependencies.aster]
 version = "0.41"
 features = ["with-syntex"]
 
+[dependencies.cfg-if]
+version = "0.1.0"
+
 [dependencies.log]
 version = "0.3"
 optional = true
 
+[dependencies.regex]
+version = "0.2"
+
+[dependencies.peeking_take_while]
+version = "0.1.2"
+
+[dependencies.clang-sys]
+version = "0.21.0"
+features = ["runtime", "clang_3_9"]
+
+[dependencies.clap]
+version = "2"
+
 [dependencies.quasi]
 version = "0.32"
 features = ["with-syntex"]
 
+[dependencies.env_logger]
+version = "0.4"
+optional = true
+
 [dependencies.cexpr]
 version = "0.2"
 
-[dependencies.env_logger]
-version = "0.4"
-optional = true
+[dependencies.lazy_static]
+version = "0.2.1"
 [dev-dependencies.diff]
 version = "0.1"
 
+[dev-dependencies.shlex]
+version = "0.1"
+
 [dev-dependencies.clap]
 version = "2"
-
-[dev-dependencies.shlex]
-version = "0.1"
 [build-dependencies.quasi_codegen]
 version = "0.32"
 
 [features]
-testing_only_extra_assertions = []
-testing_only_libclang_4 = []
-testing_only_docs = []
+testing_only_libclang_3_9 = []
+default = ["logging"]
 logging = ["env_logger", "log"]
-default = ["logging"]
+static = []
+testing_only_libclang_4 = []
 testing_only_libclang_3_8 = []
-testing_only_libclang_3_9 = []
-static = []
+testing_only_docs = []
+testing_only_extra_assertions = []
 [badges.travis-ci]
 repository = "rust-lang-nursery/rust-bindgen"
rename from third_party/rust/bindgen-0.29.0/LICENSE
rename to third_party/rust/bindgen-0.29.1/LICENSE
rename from third_party/rust/bindgen-0.29.0/README.md
rename to third_party/rust/bindgen-0.29.1/README.md
rename from third_party/rust/bindgen-0.29.0/appveyor.yml
rename to third_party/rust/bindgen-0.29.1/appveyor.yml
rename from third_party/rust/bindgen-0.29.0/book/book.toml
rename to third_party/rust/bindgen-0.29.1/book/book.toml
rename from third_party/rust/bindgen-0.29.0/book/src/SUMMARY.md
rename to third_party/rust/bindgen-0.29.1/book/src/SUMMARY.md
rename from third_party/rust/bindgen-0.29.0/book/src/blacklisting.md
rename to third_party/rust/bindgen-0.29.1/book/src/blacklisting.md
rename from third_party/rust/bindgen-0.29.0/book/src/chapter_1.md
rename to third_party/rust/bindgen-0.29.1/book/src/chapter_1.md
rename from third_party/rust/bindgen-0.29.0/book/src/command-line-usage.md
rename to third_party/rust/bindgen-0.29.1/book/src/command-line-usage.md
rename from third_party/rust/bindgen-0.29.0/book/src/cpp.md
rename to third_party/rust/bindgen-0.29.1/book/src/cpp.md
rename from third_party/rust/bindgen-0.29.0/book/src/customizing-generated-bindings.md
rename to third_party/rust/bindgen-0.29.1/book/src/customizing-generated-bindings.md
rename from third_party/rust/bindgen-0.29.0/book/src/introduction.md
rename to third_party/rust/bindgen-0.29.1/book/src/introduction.md
rename from third_party/rust/bindgen-0.29.0/book/src/library-usage.md
rename to third_party/rust/bindgen-0.29.1/book/src/library-usage.md
rename from third_party/rust/bindgen-0.29.0/book/src/nocopy.md
rename to third_party/rust/bindgen-0.29.1/book/src/nocopy.md
rename from third_party/rust/bindgen-0.29.0/book/src/opaque.md
rename to third_party/rust/bindgen-0.29.1/book/src/opaque.md
rename from third_party/rust/bindgen-0.29.0/book/src/replacing-types.md
rename to third_party/rust/bindgen-0.29.1/book/src/replacing-types.md
rename from third_party/rust/bindgen-0.29.0/book/src/requirements.md
rename to third_party/rust/bindgen-0.29.1/book/src/requirements.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-0.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-0.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-1.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-1.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-2.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-2.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-3.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-3.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-4.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-4.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-5.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-5.md
rename from third_party/rust/bindgen-0.29.0/book/src/tutorial-6.md
rename to third_party/rust/bindgen-0.29.1/book/src/tutorial-6.md
rename from third_party/rust/bindgen-0.29.0/book/src/using-unions.md
rename to third_party/rust/bindgen-0.29.1/book/src/using-unions.md
rename from third_party/rust/bindgen-0.29.0/book/src/whitelisting.md
rename to third_party/rust/bindgen-0.29.1/book/src/whitelisting.md
rename from third_party/rust/bindgen-0.29.0/build.rs
rename to third_party/rust/bindgen-0.29.1/build.rs
rename from third_party/rust/bindgen-0.29.0/ci/assert-docs.sh
rename to third_party/rust/bindgen-0.29.1/ci/assert-docs.sh
rename from third_party/rust/bindgen-0.29.0/ci/assert-no-diff.bat
rename to third_party/rust/bindgen-0.29.1/ci/assert-no-diff.bat
rename from third_party/rust/bindgen-0.29.0/ci/assert-no-diff.sh
rename to third_party/rust/bindgen-0.29.1/ci/assert-no-diff.sh
rename from third_party/rust/bindgen-0.29.0/ci/assert-rustfmt.sh
rename to third_party/rust/bindgen-0.29.1/ci/assert-rustfmt.sh
rename from third_party/rust/bindgen-0.29.0/ci/before_install.sh
rename to third_party/rust/bindgen-0.29.1/ci/before_install.sh
rename from third_party/rust/bindgen-0.29.0/ci/deploy-book.sh
rename to third_party/rust/bindgen-0.29.1/ci/deploy-book.sh
rename from third_party/rust/bindgen-0.29.0/ci/no-includes.sh
rename to third_party/rust/bindgen-0.29.1/ci/no-includes.sh
rename from third_party/rust/bindgen-0.29.0/ci/test-book.sh
rename to third_party/rust/bindgen-0.29.1/ci/test-book.sh
rename from third_party/rust/bindgen-0.29.0/ci/test.bat
rename to third_party/rust/bindgen-0.29.1/ci/test.bat
rename from third_party/rust/bindgen-0.29.0/ci/test.sh
rename to third_party/rust/bindgen-0.29.1/ci/test.sh
rename from third_party/rust/bindgen-0.29.0/example-graphviz-ir.png
rename to third_party/rust/bindgen-0.29.1/example-graphviz-ir.png
rename from third_party/rust/bindgen-0.29.0/rustfmt.toml
rename to third_party/rust/bindgen-0.29.1/rustfmt.toml
rename from third_party/rust/bindgen-0.29.0/src/callbacks.rs
rename to third_party/rust/bindgen-0.29.1/src/callbacks.rs
rename from third_party/rust/bindgen-0.29.0/src/clang.rs
rename to third_party/rust/bindgen-0.29.1/src/clang.rs
rename from third_party/rust/bindgen-0.29.0/src/codegen/error.rs
rename to third_party/rust/bindgen-0.29.1/src/codegen/error.rs
rename from third_party/rust/bindgen-0.29.0/src/codegen/helpers.rs
rename to third_party/rust/bindgen-0.29.1/src/codegen/helpers.rs
rename from third_party/rust/bindgen-0.29.0/src/codegen/mod.rs
rename to third_party/rust/bindgen-0.29.1/src/codegen/mod.rs
rename from third_party/rust/bindgen-0.29.0/src/codegen/struct_layout.rs
rename to third_party/rust/bindgen-0.29.1/src/codegen/struct_layout.rs
rename from third_party/rust/bindgen-0.29.0/src/extra_assertions.rs
rename to third_party/rust/bindgen-0.29.1/src/extra_assertions.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/analysis/derive_debug.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/analysis/derive_debug.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/analysis/has_vtable.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/analysis/has_vtable.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/analysis/mod.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/analysis/mod.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/analysis/template_params.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/analysis/template_params.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/annotations.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/annotations.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/comment.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/comment.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/comp.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/comp.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/context.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/context.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/derive.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/derive.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/dot.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/dot.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/enum_ty.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/enum_ty.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/function.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/function.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/int.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/int.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/item.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/item.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/item_kind.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/item_kind.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/layout.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/layout.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/mod.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/mod.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/module.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/module.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/objc.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/objc.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/template.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/template.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/traversal.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/traversal.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/ty.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/ty.rs
rename from third_party/rust/bindgen-0.29.0/src/ir/var.rs
rename to third_party/rust/bindgen-0.29.1/src/ir/var.rs
rename from third_party/rust/bindgen-0.29.0/src/lib.rs
rename to third_party/rust/bindgen-0.29.1/src/lib.rs
--- a/third_party/rust/bindgen-0.29.0/src/lib.rs
+++ b/third_party/rust/bindgen-0.29.1/src/lib.rs
@@ -1,17 +1,17 @@
 //! Generate Rust bindings for C and C++ libraries.
 //!
 //! Provide a C/C++ header file, receive Rust FFI code to call into C/C++
 //! functions and use types defined in the header.
 //!
 //! See the [`Builder`](./struct.Builder.html) struct for usage.
 
 #![deny(missing_docs)]
-#![deny(warnings)]
+// #![deny(warnings)]
 #![deny(unused_extern_crates)]
 
 // We internally use the deprecated BindgenOptions all over the place. Once we
 // remove its `pub` declaration, we can un-deprecate it and remove this pragma.
 #![allow(deprecated)]
 
 // To avoid rather annoying warnings when matching with CXCursor_xxx as a
 // constant.
rename from third_party/rust/bindgen-0.29.0/src/log_stubs.rs
rename to third_party/rust/bindgen-0.29.1/src/log_stubs.rs
rename from third_party/rust/bindgen-0.29.0/src/main.rs
rename to third_party/rust/bindgen-0.29.1/src/main.rs
rename from third_party/rust/bindgen-0.29.0/src/options.rs
rename to third_party/rust/bindgen-0.29.1/src/options.rs
rename from third_party/rust/bindgen-0.29.0/src/parse.rs
rename to third_party/rust/bindgen-0.29.1/src/parse.rs
rename from third_party/rust/bindgen-0.29.0/src/regex_set.rs
rename to third_party/rust/bindgen-0.29.1/src/regex_set.rs
rename from third_party/rust/bindgen-0.29.0/src/uses.rs
rename to third_party/rust/bindgen-0.29.1/src/uses.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/.cargo-checksum.json
@@ -0,0 +1,1 @@
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"79d6a139814ae0f06ce0ca85fe22a27316a27d444320b904c471c7f612129889","CHANGELOG.md":"bd7194bb4c1572c3c34764853a871649bb4f8a20bd7fe6ef96aa8c49d3eb79a9","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"5f1795410761466bc3fbcec96a4f5d560b6ccf681bfa86b337fcf3b83ee074cb","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"73c5156eeff880c0c0ea80a2eb2926797fd06376118e23f842b4164ad677d4f1","appveyor.yml":"fe7033ab25bb78005136748676f59bfdd8f65b4c5c2910af911cbb9c496bdaef","build.rs":"2b934b1cd30083531d4b751f8fe22f997e07ffc35631f15a734574d1d2fa0900","ci/before_install.sh":"402f5704cd0163254b056a515a6cdfa16482eb2e28c31eb63a5c226abd26a8b7","ci/install.bat":"d694550679e14b384f8adf8384d475866e5880002cf82d450926f4607dc9077b","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"7576ac0decd8827f2454af80631f8c7a852c0b56c28c0b08e03274a7c6e26ab0","src/link.rs":"b9f76e26fa9b1d690f6abf17e9f898d6545be149e2afe64c7411cd53e3168fcf","src/support.rs":"174534f4963a841de7c4fe14d9db6930355d99e5497ac38f42c9006440be02ef","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"cc0544b0e580d79ae7a7ce0f390f979b3fabe85370b29318d5fc51c9de92599d"},"package":"611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a"}
\ No newline at end of file
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/.travis.yml
@@ -0,0 +1,28 @@
+language: rust
+
+addons:
+  apt:
+    sources:
+      - ubuntu-toolchain-r-test
+    packages:
+      - gcc-5
+
+os:
+  - linux
+  - osx
+
+rust: stable
+
+env:
+  - LLVM_VERSION=3.5 CLANG_VERSION=clang_3_5
+  - LLVM_VERSION=4.0 CLANG_VERSION=clang_4_0
+
+# FIXME: I have no idea why this build is failing.
+matrix:
+  allow_failures:
+    - os: osx
+      env: LLVM_VERSION=4.0 CLANG_VERSION=clang_4_0
+
+before_install: . ./ci/before_install.sh
+
+script: . ./ci/script.sh
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/CHANGELOG.md
@@ -0,0 +1,223 @@
+## [0.18.0] - 2017-05-16
+
+### Changed
+- Improved finding of versioned libraries (e.g., `libclang.so.3.9`)
+
+## [0.17.0] - 2017-05-08
+
+### Changed
+- Changed storage type of include search paths from `Vec<PathBuf>` to `Option<Vec<PathBuf>>`
+
+## [0.16.0] - 2017-05-02
+
+### Changed
+- Bumped `libloading` version to `0.4.0`
+
+## [0.15.2] - 2017-04-28
+
+### Fixed
+- Fixed finding of `libclang.so.1` on Linux
+
+## [0.15.1] - 2017-03-29
+
+### Fixed
+- Fixed static linking when libraries are in [different directories](https://github.com/KyleMayes/clang-sys/issues/50)
+
+## [0.15.0] - 2017-03-13
+
+### Added
+- Added support for `clang` 4.0.x
+
+### Changed
+- Changed functions in the `Functions` struct to be `unsafe` (`runtime` feature only)
+- Changed `Clang::find` method to ignore directories and non-executable files
+- Changed `Clang::find` to skip dynamic libraries for an incorrect architecture on FreeBSD and Linux
+- Bumped `bitflags` version to `0.7.0`
+
+## [0.14.0] - 2017-01-30
+
+### Changed
+- Changed all enum types from tuple structs to raw integers to avoid
+  [segmentation faults](https://github.com/rust-lang/rust/issues/39394) on some platforms
+
+## [0.13.0] - 2017-01-29
+
+### Changed
+- Changed all opaque pointers types from tuple structs to raw pointers to avoid
+  [segmentation faults](https://github.com/rust-lang/rust/issues/39394) on some platforms
+
+## [0.12.0] - 2016-12-13
+
+### Changed
+- Altered the runtime linking API to allow for testing the presence of functions
+
+## [0.11.1] - 2016-12-07
+
+### Added
+- Added support for linking to Clang on Windows from unofficial LLVM sources such as MSYS and MinGW
+
+## [0.11.0] - 2016-10-07
+
+### Changed
+- Changed all enums from Rust enums to typed constants to avoid
+  [undefined behavior](https://github.com/KyleMayes/clang-sys/issues/42)
+
+## [0.10.1] - 2016-08-21
+
+### Changed
+- Changed static linking on FreeBSD and OS X to link against `libc++` instead of `libstd++`
+
+## [0.10.0] - 2016-08-01
+
+### Changed
+- Added `runtime` Cargo feature that links to `libclang` shared library at runtime
+- Added `from_raw` method to `CXTypeLayoutError` enum
+- Added implementations of `Deref` for opaque FFI structs
+- Changed `Default` implementations for structs to zero out the struct
+
+## [0.9.0] - 2016-07-21
+
+### Added
+- Added documentation bindings
+
+## [0.8.1] - 2016-07-20
+
+### Changed
+- Added `CLANG_PATH` environment variable for providing a path to `clang` executable
+- Added usage of `llvm-config` to search for `clang`
+- Added usage of `xcodebuild` to search for `clang` on OS X
+
+## [0.8.0] - 2016-07-18
+
+### Added
+- Added support for `clang` 3.9.x
+
+### Changed
+- Bumped `libc` version to `0.2.14`
+
+### Fixed
+- Fixed `LIBCLANG_PATH` usage on Windows to search both the `bin` and `lib` directories
+- Fixed search path parsing on OS X
+- Fixed search path parsing on Windows
+- Fixed default search path ordering on OS X
+
+## [0.7.2] - 2016-06-17
+
+### Fixed
+- Fixed finding of `clang` executables when system has executables matching `clang-*`
+  (e.g., `clang-format`)
+
+## [0.7.1] - 2016-06-10
+
+### Changed
+- Bumped `libc` version to `0.2.12`
+
+### Fixed
+- Fixed finding of `clang` executables suffixed by their version (e.g., `clang-3.5`)
+
+## [0.7.0] - 2016-05-31
+
+### Changed
+- Changed `Clang` struct `version` field type to `Option<CXVersion>`
+
+## [0.6.0] - 2016-05-26
+
+### Added
+- Added `support` module
+
+### Fixed
+- Fixed `libclang` linking on FreeBSD
+- Fixed `libclang` linking on Windows with the MSVC toolchain
+- Improved `libclang` static linking
+
+## [0.5.4] - 20160-5-19
+
+### Changed
+- Added implementations of `Default` for FFI structs
+
+## [0.5.3] - 2016-05-17
+
+### Changed
+- Bumped `bitflags` version to `0.7.0`
+
+## [0.5.2] - 2016-05-12
+
+### Fixed
+- Fixed `libclang` static linking
+
+## [0.5.1] - 2016-05-10
+
+### Fixed
+- Fixed `libclang` linking on OS X
+- Fixed `libclang` linking on Windows
+
+## [0.5.0] - 2016-05-10
+
+### Removed
+- Removed `rustc_version` dependency
+- Removed support for `LIBCLANG_STATIC` environment variable
+
+### Changed
+- Bumped `bitflags` version to `0.6.0`
+- Bumped `libc` version to `0.2.11`
+- Improved `libclang` search path
+- Improved `libclang` static linking
+
+## [0.4.2] - 2016-04-20
+
+### Changed
+- Bumped `libc` version to `0.2.10`
+
+## [0.4.1] - 2016-04-02
+
+### Changed
+- Bumped `libc` version to `0.2.9`
+- Bumped `rustc_version` version to `0.1.7`
+
+## [0.4.0] - 2016-03-28
+
+### Removed
+- Removed support for `clang` 3.4.x
+
+## [0.3.1] - 2016-03-21
+
+### Added
+- Added support for finding `libclang`
+
+## [0.3.0] - 2016-03-16
+
+### Removed
+- Removed build system types and functions
+
+### Added
+- Added support for `clang` 3.4.x
+
+### Changed
+- Bumped `bitflags` version to `0.5.0`
+- Bumped `libc` version to `0.2.8`
+
+## [0.2.1] - 2016-02-13
+
+### Changed
+- Simplified internal usage of conditional compilation
+- Bumped `bitflags` version to `0.4.0`
+- Bumped `libc` version to `0.2.7`
+- Bumped `rustc_version` version to `0.1.6`
+
+## [0.2.0] - 2016-02-12
+
+### Added
+- Added support for `clang` 3.8.x
+
+## [0.1.2] - 2015-12-29
+
+### Added
+- Added derivations of `Debug` for FFI structs
+
+## [0.1.1] - 2015-12-26
+
+### Added
+- Added derivations of `PartialOrd` and `Ord` for FFI enums
+
+## [0.1.0] - 2015-12-22
+- Initial release
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/CONTRIBUTING.md
@@ -0,0 +1,7 @@
+# Contributing to clang-sys
+
+## Pull Requests
+
+If you are intending to make a pull request, please make your changes in a branch that originated
+from the `development` branch, not the `master` branch. Then, make your pull request against the
+`development` branch.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/Cargo.toml
@@ -0,0 +1,49 @@
+[package]
+
+name = "clang-sys"
+authors = ["Kyle Mayes <kyle@mayeses.com>"]
+
+version = "0.19.0"
+
+readme = "README.md"
+license = "Apache-2.0"
+
+description = "Rust bindings for libclang."
+
+documentation = "https://kylemayes.github.io/clang-sys/3_5/clang_sys"
+repository = "https://github.com/KyleMayes/clang-sys"
+
+build = "build.rs"
+
+[features]
+
+clang_3_5 = []
+clang_3_6 = ["gte_clang_3_6"]
+clang_3_7 = ["gte_clang_3_6", "gte_clang_3_7"]
+clang_3_8 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8"]
+clang_3_9 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9"]
+clang_4_0 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9", "gte_clang_4_0"]
+
+gte_clang_3_6 = []
+gte_clang_3_7 = []
+gte_clang_3_8 = []
+gte_clang_3_9 = []
+gte_clang_4_0 = []
+
+runtime = ["libloading"]
+static = []
+
+[dependencies]
+
+bitflags = "0.9.1"
+glob = "0.2.11"
+libc = "0.2.14"
+libloading = { version = "0.4.0", optional = true }
+
+clippy = { version = "0.0.*", optional = true }
+
+[build-dependencies]
+
+glob = "0.2.11"
+
+clippy = { version = "0.0.*", optional = true }
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/README.md
@@ -0,0 +1,107 @@
+# clang-sys
+
+[![crates.io](https://img.shields.io/crates/v/clang-sys.svg)](https://crates.io/crates/clang-sys)
+[![Travis CI](https://travis-ci.org/KyleMayes/clang-sys.svg?branch=master)](https://travis-ci.org/KyleMayes/clang-sys)
+[![AppVeyor](https://ci.appveyor.com/api/projects/status/7tv5mjyg55rof356/branch/master?svg=true)](https://ci.appveyor.com/project/KyleMayes/clang-sys-vtvy5/branch/master)
+
+Rust bindings for `libclang`.
+
+If you are interested in a Rust wrapper for these bindings, see
+[clang-rs](https://github.com/KyleMayes/clang-rs).
+
+Supported on the stable, beta, and nightly Rust channels.
+
+Released under the Apache License 2.0.
+
+See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing to this repository.
+
+## Supported Versions
+
+To target a version of `libclang`, enable one of the following Cargo features:
+
+* `clang_3_5` - requires `libclang` 3.5 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/3_5/clang_sys))
+* `clang_3_6` - requires `libclang` 3.6 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/3_6/clang_sys))
+* `clang_3_7` - requires `libclang` 3.7 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/3_7/clang_sys))
+* `clang_3_8` - requires `libclang` 3.8 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/3_8/clang_sys))
+* `clang_3_9` - requires `libclang` 3.9 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/3_9/clang_sys))
+* `clang_4_0` - requires `libclang` 4.0 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys))
+
+If you do not enable one of these features, the API provided by `libclang` 3.5 will be available by
+default.
+
+## Dependencies
+
+By default, this crate will attempt to link to `libclang` dynamically. In this case, this crate
+depends on the `libclang` shared library (`libclang.so` on Linux, `libclang.dylib` on OS X,
+`libclang.dll` on Windows). If you want to link to `libclang` statically instead, enable the
+`static` Cargo feature. In this case, this crate depends on the LLVM and Clang static libraries. If
+you don't want to link to `libclang` at compiletime but instead want to load it at runtime, enable
+the `runtime` Cargo feature.
+
+These libraries can be either be installed as a part of Clang or downloaded
+[here](http://llvm.org/releases/download.html).
+
+**Note:** This crate supports finding versioned instances of `libclang.so` (e.g.,
+`libclang.so.3.9`). In the case where there are multiple instances to choose from, this crate will
+prefer an unversioned instance first, then the version with the shortest and highest version. For
+example, the following instances of `libclang.so` are listed in descending order of preference:
+
+1. `libclang.so`
+2. `libclang.so.4`
+3. `libclang.so.4.0`
+4. `libclang.so.3`
+5. `libclang.so.3.9`
+
+**Note:** The downloads for LLVM and Clang 3.8 and later do not include the `libclang.a` static
+library. This means you cannot link to any of these versions of `libclang` statically unless you
+build it from source.
+
+## Environment Variables
+
+The following environment variables, if set, are used by this crate to find the required libraries
+and executables:
+
+* `LLVM_CONFIG_PATH` **(compile time)** - provides a path to an `llvm-config` executable
+* `LIBCLANG_PATH` **(compile time)** - provides a path to a directory containing a `libclang` shared
+  library
+* `LIBCLANG_STATIC_PATH` **(compile time)** - provides a path to a directory containing LLVM and
+  Clang static libraries
+* `CLANG_PATH` **(run time)** - provides a path to a `clang` executable
+
+## Linking
+
+### Dynamic
+
+First, the `libclang` shared library will be searched for in the directory provided by the
+`LIBCLANG_PATH` environment variable if it was set. If this fails, the directory returned by
+`llvm-config --libdir` will be searched. If neither of these approaches is successful, a list of
+likely directories will be searched (e.g., `/usr/local/lib` on Linux).
+
+On Linux, running an executable that has been dynamically linked to `libclang` may require you to
+add a path to `libclang.so` to the `LD_LIBRARY_PATH` environment variable. The same is true on OS
+X, except the `DYLD_LIBRARY_PATH` environment variable is used instead.
+
+On Windows, running an executable that has been dynamically linked to `libclang` requires that
+`libclang.dll` can be found by the executable at runtime. See
+[here](https://msdn.microsoft.com/en-us/library/7d83bc18.aspx) for more information.
+
+### Static
+
+The availability of `llvm-config` is not optional for static linking. Ensure that an instance of
+this executable can be found on your system's path or set the `LLVM_CONFIG_PATH` environment
+variable. The required LLVM and Clang static libraries will be searched for in the same way as the
+shared library is searched for, except the `LIBCLANG_STATIC_PATH` environment variable is used in
+place of the `LIBCLANG_PATH` environment variable.
+
+### Runtime
+
+The `clang_sys::load` function is used to load a `libclang` shared library for use in the thread in
+which it is called. The `clang_sys::unload` function will unload the `libclang` shared library.
+`clang_sys::load` searches for a `libclang` shared library in the same way one is searched for when
+linking to `libclang` dynamically at compiletime.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/appveyor.yml
@@ -0,0 +1,12 @@
+environment:
+  matrix:
+    - LLVM_VERSION: 4.0.0
+      CLANG_VERSION: clang_4_0
+
+install:
+  - .\ci\install.bat
+
+build: false
+
+test_script:
+  - .\ci\test_script.bat
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/build.rs
@@ -0,0 +1,379 @@
+// Copyright 2016 Kyle Mayes
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Finds the required `libclang` libraries and links to them.
+//!
+//! # Environment Variables
+//!
+//! This build script can make use of several environment variables to help it find the required
+//! static or dynamic libraries.
+//!
+//! * `LLVM_CONFIG_PATH` - provides a path to an `llvm-config` executable
+//! * `LIBCLANG_PATH` - provides a path to a directory containing a `libclang` shared library
+//! * `LIBCLANG_STATIC_PATH` - provides a path to a directory containing LLVM and Clang static libraries
+
+#![allow(unused_attributes)]
+
+#![cfg_attr(feature="clippy", feature(plugin))]
+#![cfg_attr(feature="clippy", plugin(clippy))]
+#![cfg_attr(feature="clippy", warn(clippy))]
+
+extern crate glob;
+
+use std::env;
+use std::fs::{self, File};
+use std::io::{Read};
+use std::path::{Path, PathBuf};
+use std::process::{Command};
+
+use glob::{MatchOptions};
+
+/// Returns the components of the version appended to the supplied file.
+fn parse_version(file: &Path) -> Vec<u32> {
+    let string = file.to_str().unwrap_or("");
+    let components = string.split('.').skip(2);
+    components.map(|s| s.parse::<u32>().unwrap_or(0)).collect()
+}
+
+/// Returns a path to one of the supplied files if such a file can be found in the supplied directory.
+fn contains(directory: &Path, files: &[String]) -> Option<PathBuf> {
+    // Join the directory to the files to obtain our glob patterns.
+    let patterns = files.iter().filter_map(|f| directory.join(f).to_str().map(ToOwned::to_owned));
+
+    // Prevent wildcards from matching path separators.
+    let mut options = MatchOptions::new();
+    options.require_literal_separator = true;
+
+    // Collect any files that match the glob patterns.
+    let mut matches = patterns.flat_map(|p| {
+        if let Ok(paths) = glob::glob_with(&p, &options) {
+            paths.filter_map(Result::ok).collect()
+        } else {
+            vec![]
+        }
+    }).collect::<Vec<_>>();
+
+    // Sort the matches by their version, preferring shorter and higher versions.
+    matches.sort_by_key(|m| parse_version(m));
+    matches.pop()
+}
+
+/// Runs a console command, returning the output if the command was successfully executed.
+fn run(command: &str, arguments: &[&str]) -> Option<String> {
+    Command::new(command).args(arguments).output().map(|o| {
+        String::from_utf8_lossy(&o.stdout).into_owned()
+    }).ok()
+}
+
+/// Runs `llvm-config`, returning the output if the command was successfully executed.
+fn run_llvm_config(arguments: &[&str]) -> Result<String, String> {
+    match run(&env::var("LLVM_CONFIG_PATH").unwrap_or_else(|_| "llvm-config".into()), arguments) {
+        Some(output) => Ok(output),
+        None => {
+            let message = format!(
+                "couldn't execute `llvm-config {}`, set the LLVM_CONFIG_PATH environment variable \
+                to a path to a valid `llvm-config` executable",
+                arguments.join(" "),
+            );
+            Err(message)
+        },
+    }
+}
+
+/// Backup search directory globs for FreeBSD and Linux.
+const SEARCH_LINUX: &'static [&'static str] = &[
+    "/usr/lib*",
+    "/usr/lib*/*",
+    "/usr/lib*/*/*",
+    "/usr/local/lib*",
+    "/usr/local/lib*/*",
+    "/usr/local/lib*/*/*",
+    "/usr/local/llvm*/lib",
+];
+
+/// Backup search directory globs for OS X.
+const SEARCH_OSX: &'static [&'static str] = &[
+    "/usr/local/opt/llvm*/lib",
+    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib",
+    "/Library/Developer/CommandLineTools/usr/lib",
+    "/usr/local/opt/llvm*/lib/llvm*/lib",
+];
+
+/// Backup search directory globs for Windows.
+const SEARCH_WINDOWS: &'static [&'static str] = &[
+    "C:\\LLVM\\lib",
+    "C:\\Program Files*\\LLVM\\lib",
+    "C:\\MSYS*\\MinGW*\\lib",
+];
+
+/// Indicates the type of library being searched for.
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+enum Library {
+    Dynamic,
+    Static,
+}
+
+impl Library {
+    /// Checks whether the supplied file is a valid library for the architecture.
+    fn check(&self, file: &PathBuf) -> Result<(), String> {
+        if cfg!(any(target_os="freebsd", target_os="linux")) {
+            if *self == Library::Static {
+                return Ok(());
+            }
+            let mut file = try!(File::open(file).map_err(|e| e.to_string()));
+            let mut elf = [0; 5];
+            try!(file.read_exact(&mut elf).map_err(|e| e.to_string()));
+            if elf[..4] != [127, 69, 76, 70] {
+                return Err("invalid ELF header".into());
+            }
+            if cfg!(target_pointer_width="32") && elf[4] != 1 {
+                return Err("invalid ELF class (64-bit)".into());
+            }
+            if cfg!(target_pointer_width="64") && elf[4] != 2 {
+                return Err("invalid ELF class (32-bit)".into());
+            }
+            Ok(())
+        } else {
+            Ok(())
+        }
+    }
+}
+
+/// Searches for a library, returning the directory it can be found in if the search was successful.
+fn find(library: Library, files: &[String], env: &str) -> Result<PathBuf, String> {
+    let mut skipped = vec![];
+
+    /// Attempts to return the supplied file.
+    macro_rules! try_file {
+        ($file:expr) => ({
+            match library.check(&$file) {
+                Ok(_) => return Ok($file),
+                Err(message) => skipped.push(format!("({}: {})", $file.display(), message)),
+            }
+        });
+    }
+
+    /// Searches the supplied directory and, on Windows, any relevant sibling directories.
+    macro_rules! search_directory {
+        ($directory:ident) => {
+            if let Some(file) = contains(&$directory, files) {
+                try_file!(file);
+            }
+
+            // On Windows, `libclang.dll` is usually found in the LLVM `bin` directory while
+            // `libclang.lib` is usually found in the LLVM `lib` directory. To keep things
+            // consistent with other platforms, only LLVM `lib` directories are included in the
+            // backup search directory globs so we need to search the LLVM `bin` directory here.
+            if cfg!(target_os="windows") && $directory.ends_with("lib") {
+                let sibling = $directory.parent().unwrap().join("bin");
+                if let Some(file) = contains(&sibling, files) {
+                    try_file!(file);
+                }
+            }
+        }
+    }
+
+    // Search the directory provided by the relevant environment variable if it is set.
+    if let Ok(directory) = env::var(env).map(|d| Path::new(&d).to_path_buf()) {
+        search_directory!(directory);
+    }
+
+    // Search the `bin` and `lib` subdirectories in the directory returned by
+    // `llvm-config --prefix` if `llvm-config` is available.
+    if let Ok(output) = run_llvm_config(&["--prefix"]) {
+        let directory = Path::new(output.lines().next().unwrap()).to_path_buf();
+        let bin = directory.join("bin");
+        if let Some(file) = contains(&bin, files) {
+            try_file!(file);
+        }
+        let lib = directory.join("lib");
+        if let Some(file) = contains(&lib, files) {
+            try_file!(file);
+        }
+    }
+
+    // Search the backup directories.
+    let search = if cfg!(any(target_os="freebsd", target_os="linux")) {
+        SEARCH_LINUX
+    } else if cfg!(target_os="macos") {
+        SEARCH_OSX
+    } else if cfg!(target_os="windows") {
+        SEARCH_WINDOWS
+    } else {
+        &[]
+    };
+    for pattern in search {
+        let mut options = MatchOptions::new();
+        options.case_sensitive = false;
+        options.require_literal_separator = true;
+        if let Ok(paths) = glob::glob_with(pattern, &options) {
+            for path in paths.filter_map(Result::ok).filter(|p| p.is_dir()) {
+                search_directory!(path);
+            }
+        }
+    }
+
+    let message = format!(
+        "couldn't find any of [{}], set the {} environment variable to a path where one of these \
+         files can be found (skipped: [{}])",
+        files.iter().map(|f| format!("'{}'", f)).collect::<Vec<_>>().join(", "),
+        env,
+        skipped.join(", "),
+    );
+    Err(message)
+}
+
+/// Searches for a `libclang` shared library, returning the path to such a shared library if the
+/// search was successful.
+pub fn find_shared_library() -> Result<PathBuf, String> {
+    let mut files = vec![format!("{}clang{}", env::consts::DLL_PREFIX, env::consts::DLL_SUFFIX)];
+    if cfg!(any(target_os="freebsd", target_os="linux", target_os="openbsd")) {
+        // Some BSDs and Linux distributions don't create a `libclang.so` symlink, so we need to
+        // look for any versioned files (e.g., `libclang.so.3.9`).
+        files.push("libclang.so.*".into());
+    }
+    if cfg!(target_os="windows") {
+        // The official LLVM build uses `libclang.dll` on Windows instead of `clang.dll`. However,
+        // unofficial builds such as MinGW use `clang.dll`.
+        files.push("libclang.dll".into());
+    }
+    find(Library::Dynamic, &files, "LIBCLANG_PATH")
+}
+
+/// Returns the name of an LLVM or Clang library from a path to such a library.
+fn get_library_name(path: &Path) -> Option<String> {
+    path.file_stem().map(|l| l.to_string_lossy()[3..].into())
+}
+
+/// Returns the LLVM libraries required to link to `libclang` statically.
+fn get_llvm_libraries() -> Vec<String> {
+    run_llvm_config(&["--libs"]).unwrap().split_whitespace().filter_map(|p| {
+        // Depending on the version of `llvm-config` in use, listed libraries may be in one of two
+        // forms, a full path to the library or simply prefixed with `-l`.
+        if p.starts_with("-l") {
+            Some(p[2..].into())
+        } else {
+            get_library_name(Path::new(p))
+        }
+    }).collect()
+}
+
+/// Clang libraries required to link to `libclang` 3.5 and later statically.
+const CLANG_LIBRARIES: &'static [&'static str] = &[
+    "clang",
+    "clangAST",
+    "clangAnalysis",
+    "clangBasic",
+    "clangDriver",
+    "clangEdit",
+    "clangFrontend",
+    "clangIndex",
+    "clangLex",
+    "clangParse",
+    "clangRewrite",
+    "clangSema",
+    "clangSerialization",
+];
+
+/// Returns the Clang libraries required to link to `libclang` statically.
+fn get_clang_libraries<P: AsRef<Path>>(directory: P) -> Vec<String> {
+    let pattern = directory.as_ref().join("libclang*.a").to_string_lossy().to_string();
+    if let Ok(libraries) = glob::glob(&pattern) {
+        libraries.filter_map(|l| l.ok().and_then(|l| get_library_name(&l))).collect()
+    } else {
+        CLANG_LIBRARIES.iter().map(|l| l.to_string()).collect()
+    }
+}
+
+/// Find and link to `libclang` statically.
+#[cfg_attr(feature="runtime", allow(dead_code))]
+fn link_static() {
+    let file = find(Library::Static, &["libclang.a".into()], "LIBCLANG_STATIC_PATH").unwrap();
+    let directory = file.parent().unwrap();
+    print!("cargo:rustc-flags=");
+
+    // Specify required Clang static libraries.
+    print!("-L {} ", directory.display());
+    for library in get_clang_libraries(directory) {
+        print!("-l static={} ", library);
+    }
+
+    // Specify required LLVM static libraries.
+    print!("-L {} ", run_llvm_config(&["--libdir"]).unwrap().trim_right());
+    for library in get_llvm_libraries() {
+        print!("-l static={} ", library);
+    }
+
+    // Specify required system libraries.
+    if cfg!(target_os="freebsd") {
+        println!("-l ffi -l ncursesw -l c++ -l z");
+    } else if cfg!(target_os="linux") {
+        println!("-l ffi -l ncursesw -l stdc++ -l z");
+    } else if cfg!(target_os="macos") {
+        println!("-l ffi -l ncurses -l c++ -l z");
+    } else {
+        panic!("unsupported operating system for static linking");
+    }
+}
+
+/// Find and link to `libclang` dynamically.
+#[cfg_attr(feature="runtime", allow(dead_code))]
+fn link_dynamic() {
+    let file = find_shared_library().unwrap();
+    let directory = file.parent().unwrap();
+    println!("cargo:rustc-link-search={}", directory.display());
+
+    if cfg!(all(target_os="windows", target_env="msvc")) {
+        // Find the `libclang` stub static library required for the MSVC toolchain.
+        let libdir = if !directory.ends_with("bin") {
+            directory.to_owned()
+        } else {
+            directory.parent().unwrap().join("lib")
+        };
+        if libdir.join("libclang.lib").exists() {
+            println!("cargo:rustc-link-search={}", libdir.display());
+        } else if libdir.join("libclang.dll.a").exists() {
+            // MSYS and MinGW use `libclang.dll.a` instead of `libclang.lib`. It is linkable with
+            // the MSVC linker, but Rust doesn't recognize the `.a` suffix, so we need to copy it
+            // with a different name.
+            //
+            // FIXME: Maybe we can just hardlink or symlink it?
+            let out = env::var("OUT_DIR").unwrap();
+            fs::copy(libdir.join("libclang.dll.a"), Path::new(&out).join("libclang.lib")).unwrap();
+            println!("cargo:rustc-link-search=native={}", out);
+        } else {
+            panic!(
+                "using '{}', so 'libclang.lib' or 'libclang.dll.a' must be available in {}",
+                file.display(),
+                libdir.display(),
+            );
+        }
+        println!("cargo:rustc-link-lib=dylib=libclang");
+    } else {
+        println!("cargo:rustc-link-lib=dylib=clang");
+    }
+}
+
+#[cfg_attr(feature="runtime", allow(dead_code))]
+fn main() {
+    if cfg!(feature="runtime") {
+        if cfg!(feature="static") {
+            panic!("`runtime` and `static` features can't be combined");
+        }
+    } else if cfg!(feature="static") {
+        link_static();
+    } else {
+        link_dynamic();
+    }
+}
new file mode 100755
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/ci/before_install.sh
@@ -0,0 +1,36 @@
+set -e
+
+function llvm_version_triple() {
+    if [ "$1" == "3.5" ]; then
+        echo "3.5.2"
+    elif [ "$1" == "3.6" ]; then
+        echo "3.6.2"
+    elif [ "$1" == "3.7" ]; then
+        echo "3.7.1"
+    elif [ "$1" == "3.8" ]; then
+        echo "3.8.1"
+    elif [ "$1" == "3.9" ]; then
+        echo "3.9.0"
+    elif [ "$1" == "4.0" ]; then
+        echo "4.0.0"
+    fi
+}
+
+function llvm_download() {
+    export LLVM_VERSION_TRIPLE=`llvm_version_triple ${LLVM_VERSION}`
+    export LLVM=clang+llvm-${LLVM_VERSION_TRIPLE}-x86_64-$1
+
+    wget http://llvm.org/releases/${LLVM_VERSION_TRIPLE}/${LLVM}.tar.xz
+    mkdir llvm
+    tar xf ${LLVM}.tar.xz -C llvm --strip-components=1
+
+    export LLVM_CONFIG_PATH=`pwd`/llvm/bin/llvm-config
+}
+
+if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
+    llvm_download linux-gnu-ubuntu-14.04
+    export LD_LIBRARY_PATH=`pwd`/llvm/lib:$LD_LIBRARY_PATH
+else
+    llvm_download apple-darwin
+    export DYLD_LIBRARY_PATH=`pwd`/llvm/lib:$DYLD_LIBRARY_PATH
+fi
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/ci/install.bat
@@ -0,0 +1,8 @@
+curl -sSf https://static.rust-lang.org/dist/rust-1.10.0-i686-pc-windows-msvc.exe -o rust.exe
+rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
+set PATH=%PATH%;C:\Rust\bin
+
+curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe
+7z x LLVM.exe -oC:\LLVM
+set PATH=%PATH%;C:\LLVM\bin
+set LIBCLANG_PATH=C:\LLVM\bin
new file mode 100755
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/ci/script.sh
@@ -0,0 +1,13 @@
+if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
+    rvm get head || true
+fi
+
+set -e
+
+RUST_BACKTRACE=1 cargo test --verbose --features $CLANG_VERSION -- --nocapture
+
+if [ "${CLANG_VERSION}" \< "clang_3_7" ]; then
+    RUST_BACKTRACE=1 cargo test --verbose --features "$CLANG_VERSION static" -- --nocapture
+fi
+
+RUST_BACKTRACE=1 cargo test --verbose --features "$CLANG_VERSION runtime" -- --nocapture
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/ci/test_script.bat
@@ -0,0 +1,2 @@
+set RUST_BACKTRACE=1
+cargo test --verbose --features %CLANG_VERSION% -- --nocapture
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/clippy.toml
@@ -0,0 +1,1 @@
+doc-valid-idents = ["FreeBSD"]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/src/lib.rs
@@ -0,0 +1,1730 @@
+// Copyright 2016 Kyle Mayes
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Rust bindings for `libclang`.
+//!
+//! ## Supported Versions
+//!
+//! * 3.5 - [Documentation](https://kylemayes.github.io/clang-sys/3_5/clang_sys)
+//! * 3.6 - [Documentation](https://kylemayes.github.io/clang-sys/3_6/clang_sys)
+//! * 3.7 - [Documentation](https://kylemayes.github.io/clang-sys/3_7/clang_sys)
+//! * 3.8 - [Documentation](https://kylemayes.github.io/clang-sys/3_8/clang_sys)
+//! * 3.9 - [Documentation](https://kylemayes.github.io/clang-sys/3_9/clang_sys)
+//! * 4.0 - [Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys)
+
+#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
+
+#![cfg_attr(feature="clippy", feature(plugin))]
+#![cfg_attr(feature="clippy", plugin(clippy))]
+#![cfg_attr(feature="clippy", warn(clippy))]
+
+#[macro_use]
+extern crate bitflags;
+
+extern crate glob;
+extern crate libc;
+#[cfg(feature="runtime")]
+extern crate libloading;
+
+pub mod support;
+
+#[macro_use]
+mod link;
+
+use std::mem;
+
+use libc::{c_char, c_int, c_longlong, c_uint, c_ulong, c_ulonglong, c_void, time_t};
+
+pub type CXClientData = *mut c_void;
+pub type CXCursorVisitor = extern fn(CXCursor, CXCursor, CXClientData) -> CXChildVisitResult;
+#[cfg(feature="gte_clang_3_7")]
+pub type CXFieldVisitor = extern fn(CXCursor, CXClientData) -> CXVisitorResult;
+pub type CXInclusionVisitor = extern fn(CXFile, *mut CXSourceLocation, c_uint, CXClientData);
+
+//================================================
+// Macros
+//================================================
+
+// cenum! ________________________________________
+
+/// Defines a C enum as a series of constants.
+macro_rules! cenum {
+    ($(#[$meta:meta])* enum $name:ident {
+        $($(#[$vmeta:meta])* const $variant:ident = $value:expr), +,
+    }) => (
+        pub type $name = c_int;
+
+        $($(#[$vmeta])* pub const $variant: $name = $value;)+
+    );
+}
+
+// default! ______________________________________
+
+/// Implements a zeroing implementation of `Default` for the supplied type.
+macro_rules! default {
+    (#[$meta:meta] $ty:ty) => {
+        #[$meta]
+        impl Default for $ty {
+            fn default() -> $ty {
+                unsafe { mem::zeroed() }
+            }
+        }
+    };
+
+    ($ty:ty) => {
+        impl Default for $ty {
+            fn default() -> $ty {
+                unsafe { mem::zeroed() }
+            }
+        }
+    };
+}
+
+//================================================
+// Enums
+//================================================
+
+cenum! {
+    enum CXAvailabilityKind {
+        const CXAvailability_Available = 0,
+        const CXAvailability_Deprecated = 1,
+        const CXAvailability_NotAvailable = 2,
+        const CXAvailability_NotAccessible = 3,
+    }
+}
+
+cenum! {
+    enum CXCallingConv {
+        const CXCallingConv_Default = 0,
+        const CXCallingConv_C = 1,
+        const CXCallingConv_X86StdCall = 2,
+        const CXCallingConv_X86FastCall = 3,
+        const CXCallingConv_X86ThisCall = 4,
+        const CXCallingConv_X86Pascal = 5,
+        const CXCallingConv_AAPCS = 6,
+        const CXCallingConv_AAPCS_VFP = 7,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCallingConv_X86RegCall = 8,
+        const CXCallingConv_IntelOclBicc = 9,
+        const CXCallingConv_X86_64Win64 = 10,
+        const CXCallingConv_X86_64SysV = 11,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCallingConv_X86VectorCall = 12,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCallingConv_Swift = 13,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCallingConv_PreserveMost = 14,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCallingConv_PreserveAll = 15,
+        const CXCallingConv_Invalid = 100,
+        const CXCallingConv_Unexposed = 200,
+    }
+}
+
+cenum! {
+    enum CXChildVisitResult {
+        const CXChildVisit_Break = 0,
+        const CXChildVisit_Continue = 1,
+        const CXChildVisit_Recurse = 2,
+    }
+}
+
+cenum! {
+    enum CXCommentInlineCommandRenderKind {
+        const CXCommentInlineCommandRenderKind_Normal = 0,
+        const CXCommentInlineCommandRenderKind_Bold = 1,
+        const CXCommentInlineCommandRenderKind_Monospaced = 2,
+        const CXCommentInlineCommandRenderKind_Emphasized = 3,
+    }
+}
+
+cenum! {
+    enum CXCommentKind {
+        const CXComment_Null = 0,
+        const CXComment_Text = 1,
+        const CXComment_InlineCommand = 2,
+        const CXComment_HTMLStartTag = 3,
+        const CXComment_HTMLEndTag = 4,
+        const CXComment_Paragraph = 5,
+        const CXComment_BlockCommand = 6,
+        const CXComment_ParamCommand = 7,
+        const CXComment_TParamCommand = 8,
+        const CXComment_VerbatimBlockCommand = 9,
+        const CXComment_VerbatimBlockLine = 10,
+        const CXComment_VerbatimLine = 11,
+        const CXComment_FullComment = 12,
+    }
+}
+
+cenum! {
+    enum CXCommentParamPassDirection {
+        const CXCommentParamPassDirection_In = 0,
+        const CXCommentParamPassDirection_Out = 1,
+        const CXCommentParamPassDirection_InOut = 2,
+    }
+}
+
+cenum! {
+    enum CXCompilationDatabase_Error {
+        const CXCompilationDatabase_NoError = 0,
+        const CXCompilationDatabase_CanNotLoadDatabase = 1,
+    }
+}
+
+cenum! {
+    enum CXCompletionChunkKind {
+        const CXCompletionChunk_Optional = 0,
+        const CXCompletionChunk_TypedText = 1,
+        const CXCompletionChunk_Text = 2,
+        const CXCompletionChunk_Placeholder = 3,
+        const CXCompletionChunk_Informative = 4,
+        const CXCompletionChunk_CurrentParameter = 5,
+        const CXCompletionChunk_LeftParen = 6,
+        const CXCompletionChunk_RightParen = 7,
+        const CXCompletionChunk_LeftBracket = 8,
+        const CXCompletionChunk_RightBracket = 9,
+        const CXCompletionChunk_LeftBrace = 10,
+        const CXCompletionChunk_RightBrace = 11,
+        const CXCompletionChunk_LeftAngle = 12,
+        const CXCompletionChunk_RightAngle = 13,
+        const CXCompletionChunk_Comma = 14,
+        const CXCompletionChunk_ResultType = 15,
+        const CXCompletionChunk_Colon = 16,
+        const CXCompletionChunk_SemiColon = 17,
+        const CXCompletionChunk_Equal = 18,
+        const CXCompletionChunk_HorizontalSpace = 19,
+        const CXCompletionChunk_VerticalSpace = 20,
+    }
+}
+
+cenum! {
+    enum CXCursorKind {
+        const CXCursor_UnexposedDecl = 1,
+        const CXCursor_StructDecl = 2,
+        const CXCursor_UnionDecl = 3,
+        const CXCursor_ClassDecl = 4,
+        const CXCursor_EnumDecl = 5,
+        const CXCursor_FieldDecl = 6,
+        const CXCursor_EnumConstantDecl = 7,
+        const CXCursor_FunctionDecl = 8,
+        const CXCursor_VarDecl = 9,
+        const CXCursor_ParmDecl = 10,
+        const CXCursor_ObjCInterfaceDecl = 11,
+        const CXCursor_ObjCCategoryDecl = 12,
+        const CXCursor_ObjCProtocolDecl = 13,
+        const CXCursor_ObjCPropertyDecl = 14,
+        const CXCursor_ObjCIvarDecl = 15,
+        const CXCursor_ObjCInstanceMethodDecl = 16,
+        const CXCursor_ObjCClassMethodDecl = 17,
+        const CXCursor_ObjCImplementationDecl = 18,
+        const CXCursor_ObjCCategoryImplDecl = 19,
+        const CXCursor_TypedefDecl = 20,
+        const CXCursor_CXXMethod = 21,
+        const CXCursor_Namespace = 22,
+        const CXCursor_LinkageSpec = 23,
+        const CXCursor_Constructor = 24,
+        const CXCursor_Destructor = 25,
+        const CXCursor_ConversionFunction = 26,
+        const CXCursor_TemplateTypeParameter = 27,
+        const CXCursor_NonTypeTemplateParameter = 28,
+        const CXCursor_TemplateTemplateParameter = 29,
+        const CXCursor_FunctionTemplate = 30,
+        const CXCursor_ClassTemplate = 31,
+        const CXCursor_ClassTemplatePartialSpecialization = 32,
+        const CXCursor_NamespaceAlias = 33,
+        const CXCursor_UsingDirective = 34,
+        const CXCursor_UsingDeclaration = 35,
+        const CXCursor_TypeAliasDecl = 36,
+        const CXCursor_ObjCSynthesizeDecl = 37,
+        const CXCursor_ObjCDynamicDecl = 38,
+        const CXCursor_CXXAccessSpecifier = 39,
+        const CXCursor_ObjCSuperClassRef = 40,
+        const CXCursor_ObjCProtocolRef = 41,
+        const CXCursor_ObjCClassRef = 42,
+        const CXCursor_TypeRef = 43,
+        const CXCursor_CXXBaseSpecifier = 44,
+        const CXCursor_TemplateRef = 45,
+        const CXCursor_NamespaceRef = 46,
+        const CXCursor_MemberRef = 47,
+        const CXCursor_LabelRef = 48,
+        const CXCursor_OverloadedDeclRef = 49,
+        const CXCursor_VariableRef = 50,
+        const CXCursor_InvalidFile = 70,
+        const CXCursor_NoDeclFound = 71,
+        const CXCursor_NotImplemented = 72,
+        const CXCursor_InvalidCode = 73,
+        const CXCursor_UnexposedExpr = 100,
+        const CXCursor_DeclRefExpr = 101,
+        const CXCursor_MemberRefExpr = 102,
+        const CXCursor_CallExpr = 103,
+        const CXCursor_ObjCMessageExpr = 104,
+        const CXCursor_BlockExpr = 105,
+        const CXCursor_IntegerLiteral = 106,
+        const CXCursor_FloatingLiteral = 107,
+        const CXCursor_ImaginaryLiteral = 108,
+        const CXCursor_StringLiteral = 109,
+        const CXCursor_CharacterLiteral = 110,
+        const CXCursor_ParenExpr = 111,
+        const CXCursor_UnaryOperator = 112,
+        const CXCursor_ArraySubscriptExpr = 113,
+        const CXCursor_BinaryOperator = 114,
+        const CXCursor_CompoundAssignOperator = 115,
+        const CXCursor_ConditionalOperator = 116,
+        const CXCursor_CStyleCastExpr = 117,
+        const CXCursor_CompoundLiteralExpr = 118,
+        const CXCursor_InitListExpr = 119,
+        const CXCursor_AddrLabelExpr = 120,
+        const CXCursor_StmtExpr = 121,
+        const CXCursor_GenericSelectionExpr = 122,
+        const CXCursor_GNUNullExpr = 123,
+        const CXCursor_CXXStaticCastExpr = 124,
+        const CXCursor_CXXDynamicCastExpr = 125,
+        const CXCursor_CXXReinterpretCastExpr = 126,
+        const CXCursor_CXXConstCastExpr = 127,
+        const CXCursor_CXXFunctionalCastExpr = 128,
+        const CXCursor_CXXTypeidExpr = 129,
+        const CXCursor_CXXBoolLiteralExpr = 130,
+        const CXCursor_CXXNullPtrLiteralExpr = 131,
+        const CXCursor_CXXThisExpr = 132,
+        const CXCursor_CXXThrowExpr = 133,
+        const CXCursor_CXXNewExpr = 134,
+        const CXCursor_CXXDeleteExpr = 135,
+        const CXCursor_UnaryExpr = 136,
+        const CXCursor_ObjCStringLiteral = 137,
+        const CXCursor_ObjCEncodeExpr = 138,
+        const CXCursor_ObjCSelectorExpr = 139,
+        const CXCursor_ObjCProtocolExpr = 140,
+        const CXCursor_ObjCBridgedCastExpr = 141,
+        const CXCursor_PackExpansionExpr = 142,
+        const CXCursor_SizeOfPackExpr = 143,
+        const CXCursor_LambdaExpr = 144,
+        const CXCursor_ObjCBoolLiteralExpr = 145,
+        const CXCursor_ObjCSelfExpr = 146,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_OMPArraySectionExpr = 147,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_ObjCAvailabilityCheckExpr = 148,
+        const CXCursor_UnexposedStmt = 200,
+        const CXCursor_LabelStmt = 201,
+        const CXCursor_CompoundStmt = 202,
+        const CXCursor_CaseStmt = 203,
+        const CXCursor_DefaultStmt = 204,
+        const CXCursor_IfStmt = 205,
+        const CXCursor_SwitchStmt = 206,
+        const CXCursor_WhileStmt = 207,
+        const CXCursor_DoStmt = 208,
+        const CXCursor_ForStmt = 209,
+        const CXCursor_GotoStmt = 210,
+        const CXCursor_IndirectGotoStmt = 211,
+        const CXCursor_ContinueStmt = 212,
+        const CXCursor_BreakStmt = 213,
+        const CXCursor_ReturnStmt = 214,
+        /// Duplicate of `CXCursor_GccAsmStmt`.
+        const CXCursor_AsmStmt = 215,
+        const CXCursor_ObjCAtTryStmt = 216,
+        const CXCursor_ObjCAtCatchStmt = 217,
+        const CXCursor_ObjCAtFinallyStmt = 218,
+        const CXCursor_ObjCAtThrowStmt = 219,
+        const CXCursor_ObjCAtSynchronizedStmt = 220,
+        const CXCursor_ObjCAutoreleasePoolStmt = 221,
+        const CXCursor_ObjCForCollectionStmt = 222,
+        const CXCursor_CXXCatchStmt = 223,
+        const CXCursor_CXXTryStmt = 224,
+        const CXCursor_CXXForRangeStmt = 225,
+        const CXCursor_SEHTryStmt = 226,
+        const CXCursor_SEHExceptStmt = 227,
+        const CXCursor_SEHFinallyStmt = 228,
+        const CXCursor_MSAsmStmt = 229,
+        const CXCursor_NullStmt = 230,
+        const CXCursor_DeclStmt = 231,
+        const CXCursor_OMPParallelDirective = 232,
+        const CXCursor_OMPSimdDirective = 233,
+        const CXCursor_OMPForDirective = 234,
+        const CXCursor_OMPSectionsDirective = 235,
+        const CXCursor_OMPSectionDirective = 236,
+        const CXCursor_OMPSingleDirective = 237,
+        const CXCursor_OMPParallelForDirective = 238,
+        const CXCursor_OMPParallelSectionsDirective = 239,
+        const CXCursor_OMPTaskDirective = 240,
+        const CXCursor_OMPMasterDirective = 241,
+        const CXCursor_OMPCriticalDirective = 242,
+        const CXCursor_OMPTaskyieldDirective = 243,
+        const CXCursor_OMPBarrierDirective = 244,
+        const CXCursor_OMPTaskwaitDirective = 245,
+        const CXCursor_OMPFlushDirective = 246,
+        const CXCursor_SEHLeaveStmt = 247,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_OMPOrderedDirective = 248,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_OMPAtomicDirective = 249,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_OMPForSimdDirective = 250,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_OMPParallelForSimdDirective = 251,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_OMPTargetDirective = 252,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_OMPTeamsDirective = 253,
+        /// Only produced by `libclang` 3.7 and later.
+        const CXCursor_OMPTaskgroupDirective = 254,
+        /// Only produced by `libclang` 3.7 and later.
+        const CXCursor_OMPCancellationPointDirective = 255,
+        /// Only produced by `libclang` 3.7 and later.
+        const CXCursor_OMPCancelDirective = 256,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_OMPTargetDataDirective = 257,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_OMPTaskLoopDirective = 258,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_OMPTaskLoopSimdDirective = 259,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_OMPDistributeDirective = 260,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPTargetEnterDataDirective = 261,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPTargetExitDataDirective = 262,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPTargetParallelDirective = 263,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPTargetParallelForDirective = 264,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPTargetUpdateDirective = 265,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPDistributeParallelForDirective = 266,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPDistributeParallelForSimdDirective = 267,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPDistributeSimdDirective = 268,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_OMPTargetParallelForSimdDirective = 269,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTargetSimdDirective = 270,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTeamsDistributeDirective = 271,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTeamsDistributeSimdDirective = 272,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTeamsDistributeParallelForSimdDirective = 273,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTeamsDistributeParallelForDirective = 274,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTargetTeamsDirective = 275,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTargetTeamsDistributeDirective = 276,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective = 278,
+        /// Only producer by `libclang` 4.0 and later.
+        const CXCursor_OMPTargetTeamsDistributeSimdDirective = 279,
+        const CXCursor_TranslationUnit = 300,
+        const CXCursor_UnexposedAttr = 400,
+        const CXCursor_IBActionAttr = 401,
+        const CXCursor_IBOutletAttr = 402,
+        const CXCursor_IBOutletCollectionAttr = 403,
+        const CXCursor_CXXFinalAttr = 404,
+        const CXCursor_CXXOverrideAttr = 405,
+        const CXCursor_AnnotateAttr = 406,
+        const CXCursor_AsmLabelAttr = 407,
+        const CXCursor_PackedAttr = 408,
+        const CXCursor_PureAttr = 409,
+        const CXCursor_ConstAttr = 410,
+        const CXCursor_NoDuplicateAttr = 411,
+        const CXCursor_CUDAConstantAttr = 412,
+        const CXCursor_CUDADeviceAttr = 413,
+        const CXCursor_CUDAGlobalAttr = 414,
+        const CXCursor_CUDAHostAttr = 415,
+        /// Only produced by `libclang` 3.6 and later.
+        const CXCursor_CUDASharedAttr = 416,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_VisibilityAttr = 417,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_DLLExport = 418,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_DLLImport = 419,
+        const CXCursor_PreprocessingDirective = 500,
+        const CXCursor_MacroDefinition = 501,
+        /// Duplicate of `CXCursor_MacroInstantiation`.
+        const CXCursor_MacroExpansion = 502,
+        const CXCursor_InclusionDirective = 503,
+        const CXCursor_ModuleImportDecl = 600,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXCursor_TypeAliasTemplateDecl = 601,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXCursor_StaticAssert = 602,
+        /// Only produced by `libclang` 4.0 and later.
+        const CXCursor_FriendDecl = 603,
+        /// Only produced by `libclang` 3.7 and later.
+        const CXCursor_OverloadCandidate = 700,
+    }
+}
+
+cenum! {
+    enum CXDiagnosticSeverity {
+        const CXDiagnostic_Ignored = 0,
+        const CXDiagnostic_Note = 1,
+        const CXDiagnostic_Warning = 2,
+        const CXDiagnostic_Error = 3,
+        const CXDiagnostic_Fatal = 4,
+    }
+}
+
+cenum! {
+    enum CXErrorCode {
+        const CXError_Success = 0,
+        const CXError_Failure = 1,
+        const CXError_Crashed = 2,
+        const CXError_InvalidArguments = 3,
+        const CXError_ASTReadError = 4,
+    }
+}
+
+cenum! {
+    enum CXEvalResultKind {
+        const CXEval_UnExposed = 0,
+        const CXEval_Int = 1 ,
+        const CXEval_Float = 2,
+        const CXEval_ObjCStrLiteral = 3,
+        const CXEval_StrLiteral = 4,
+        const CXEval_CFStr = 5,
+        const CXEval_Other = 6,
+    }
+}
+
+cenum! {
+    enum CXIdxAttrKind {
+        const CXIdxAttr_Unexposed = 0,
+        const CXIdxAttr_IBAction = 1,
+        const CXIdxAttr_IBOutlet = 2,
+        const CXIdxAttr_IBOutletCollection = 3,
+    }
+}
+
+cenum! {
+    enum CXIdxEntityCXXTemplateKind {
+        const CXIdxEntity_NonTemplate = 0,
+        const CXIdxEntity_Template = 1,
+        const CXIdxEntity_TemplatePartialSpecialization = 2,
+        const CXIdxEntity_TemplateSpecialization = 3,
+    }
+}
+
+cenum! {
+    enum CXIdxEntityKind {
+        const CXIdxEntity_Unexposed = 0,
+        const CXIdxEntity_Typedef = 1,
+        const CXIdxEntity_Function = 2,
+        const CXIdxEntity_Variable = 3,
+        const CXIdxEntity_Field = 4,
+        const CXIdxEntity_EnumConstant = 5,
+        const CXIdxEntity_ObjCClass = 6,
+        const CXIdxEntity_ObjCProtocol = 7,
+        const CXIdxEntity_ObjCCategory = 8,
+        const CXIdxEntity_ObjCInstanceMethod = 9,
+        const CXIdxEntity_ObjCClassMethod = 10,
+        const CXIdxEntity_ObjCProperty = 11,
+        const CXIdxEntity_ObjCIvar = 12,
+        const CXIdxEntity_Enum = 13,
+        const CXIdxEntity_Struct = 14,
+        const CXIdxEntity_Union = 15,
+        const CXIdxEntity_CXXClass = 16,
+        const CXIdxEntity_CXXNamespace = 17,
+        const CXIdxEntity_CXXNamespaceAlias = 18,
+        const CXIdxEntity_CXXStaticVariable = 19,
+        const CXIdxEntity_CXXStaticMethod = 20,
+        const CXIdxEntity_CXXInstanceMethod = 21,
+        const CXIdxEntity_CXXConstructor = 22,
+        const CXIdxEntity_CXXDestructor = 23,
+        const CXIdxEntity_CXXConversionFunction = 24,
+        const CXIdxEntity_CXXTypeAlias = 25,
+        const CXIdxEntity_CXXInterface = 26,
+    }
+}
+
+cenum! {
+    enum CXIdxEntityLanguage {
+        const CXIdxEntityLang_None = 0,
+        const CXIdxEntityLang_C = 1,
+        const CXIdxEntityLang_ObjC = 2,
+        const CXIdxEntityLang_CXX = 3,
+    }
+}
+
+cenum! {
+    enum CXIdxEntityRefKind {
+        const CXIdxEntityRef_Direct = 1,
+        const CXIdxEntityRef_Implicit = 2,
+    }
+}
+
+cenum! {
+    enum CXIdxObjCContainerKind {
+        const CXIdxObjCContainer_ForwardRef = 0,
+        const CXIdxObjCContainer_Interface = 1,
+        const CXIdxObjCContainer_Implementation = 2,
+    }
+}
+
+cenum! {
+    enum CXLanguageKind {
+        const CXLanguage_Invalid = 0,
+        const CXLanguage_C = 1,
+        const CXLanguage_ObjC = 2,
+        const CXLanguage_CPlusPlus = 3,
+    }
+}
+
+cenum! {
+    enum CXLinkageKind {
+        const CXLinkage_Invalid = 0,
+        const CXLinkage_NoLinkage = 1,
+        const CXLinkage_Internal = 2,
+        const CXLinkage_UniqueExternal = 3,
+        const CXLinkage_External = 4,
+    }
+}
+
+cenum! {
+    enum CXLoadDiag_Error {
+        const CXLoadDiag_None = 0,
+        const CXLoadDiag_Unknown = 1,
+        const CXLoadDiag_CannotLoad = 2,
+        const CXLoadDiag_InvalidFile = 3,
+    }
+}
+
+cenum! {
+    enum CXRefQualifierKind {
+        const CXRefQualifier_None = 0,
+        const CXRefQualifier_LValue = 1,
+        const CXRefQualifier_RValue = 2,
+    }
+}
+
+cenum! {
+    enum CXResult {
+        const CXResult_Success = 0,
+        const CXResult_Invalid = 1,
+        const CXResult_VisitBreak = 2,
+    }
+}
+
+cenum! {
+    enum CXSaveError {
+        const CXSaveError_None = 0,
+        const CXSaveError_Unknown = 1,
+        const CXSaveError_TranslationErrors = 2,
+        const CXSaveError_InvalidTU = 3,
+    }
+}
+
+cenum! {
+    enum CXTUResourceUsageKind {
+        const CXTUResourceUsage_AST = 1,
+        const CXTUResourceUsage_Identifiers = 2,
+        const CXTUResourceUsage_Selectors = 3,
+        const CXTUResourceUsage_GlobalCompletionResults = 4,
+        const CXTUResourceUsage_SourceManagerContentCache = 5,
+        const CXTUResourceUsage_AST_SideTables = 6,
+        const CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7,
+        const CXTUResourceUsage_SourceManager_Membuffer_MMap = 8,
+        const CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9,
+        const CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10,
+        const CXTUResourceUsage_Preprocessor = 11,
+        const CXTUResourceUsage_PreprocessingRecord = 12,
+        const CXTUResourceUsage_SourceManager_DataStructures = 13,
+        const CXTUResourceUsage_Preprocessor_HeaderSearch = 14,
+    }
+}
+
+cenum! {
+    #[cfg(feature="gte_clang_3_6")]
+    enum CXTemplateArgumentKind {
+        const CXTemplateArgumentKind_Null = 0,
+        const CXTemplateArgumentKind_Type = 1,
+        const CXTemplateArgumentKind_Declaration = 2,
+        const CXTemplateArgumentKind_NullPtr = 3,
+        const CXTemplateArgumentKind_Integral = 4,
+        const CXTemplateArgumentKind_Template = 5,
+        const CXTemplateArgumentKind_TemplateExpansion = 6,
+        const CXTemplateArgumentKind_Expression = 7,
+        const CXTemplateArgumentKind_Pack = 8,
+        const CXTemplateArgumentKind_Invalid = 9,
+    }
+}
+
+cenum! {
+    enum CXTokenKind {
+        const CXToken_Punctuation = 0,
+        const CXToken_Keyword = 1,
+        const CXToken_Identifier = 2,
+        const CXToken_Literal = 3,
+        const CXToken_Comment = 4,
+    }
+}
+
+cenum! {
+    enum CXTypeKind {
+        const CXType_Invalid = 0,
+        const CXType_Unexposed = 1,
+        const CXType_Void = 2,
+        const CXType_Bool = 3,
+        const CXType_Char_U = 4,
+        const CXType_UChar = 5,
+        const CXType_Char16 = 6,
+        const CXType_Char32 = 7,
+        const CXType_UShort = 8,
+        const CXType_UInt = 9,
+        const CXType_ULong = 10,
+        const CXType_ULongLong = 11,
+        const CXType_UInt128 = 12,
+        const CXType_Char_S = 13,
+        const CXType_SChar = 14,
+        const CXType_WChar = 15,
+        const CXType_Short = 16,
+        const CXType_Int = 17,
+        const CXType_Long = 18,
+        const CXType_LongLong = 19,
+        const CXType_Int128 = 20,
+        const CXType_Float = 21,
+        const CXType_Double = 22,
+        const CXType_LongDouble = 23,
+        const CXType_NullPtr = 24,
+        const CXType_Overload = 25,
+        const CXType_Dependent = 26,
+        const CXType_ObjCId = 27,
+        const CXType_ObjCClass = 28,
+        const CXType_ObjCSel = 29,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXType_Float128 = 30,
+        const CXType_Complex = 100,
+        const CXType_Pointer = 101,
+        const CXType_BlockPointer = 102,
+        const CXType_LValueReference = 103,
+        const CXType_RValueReference = 104,
+        const CXType_Record = 105,
+        const CXType_Enum = 106,
+        const CXType_Typedef = 107,
+        const CXType_ObjCInterface = 108,
+        const CXType_ObjCObjectPointer = 109,
+        const CXType_FunctionNoProto = 110,
+        const CXType_FunctionProto = 111,
+        const CXType_ConstantArray = 112,
+        const CXType_Vector = 113,
+        const CXType_IncompleteArray = 114,
+        const CXType_VariableArray = 115,
+        const CXType_DependentSizedArray = 116,
+        const CXType_MemberPointer = 117,
+        /// Only produced by `libclang` 3.8 and later.
+        const CXType_Auto = 118,
+        /// Only produced by `libclang` 3.9 and later.
+        const CXType_Elaborated = 119,
+    }
+}
+
+cenum! {
+    enum CXTypeLayoutError {
+        const CXTypeLayoutError_Invalid = -1,
+        const CXTypeLayoutError_Incomplete = -2,
+        const CXTypeLayoutError_Dependent = -3,
+        const CXTypeLayoutError_NotConstantSize = -4,
+        const CXTypeLayoutError_InvalidFieldName = -5,
+    }
+}
+
+cenum! {
+    #[cfg(feature="gte_clang_3_8")]
+    enum CXVisibilityKind {
+        const CXVisibility_Invalid = 0,
+        const CXVisibility_Hidden = 1,
+        const CXVisibility_Protected = 2,
+        const CXVisibility_Default = 3,
+    }
+}
+
+cenum! {
+    enum CXVisitorResult {
+        const CXVisit_Break = 0,
+        const CXVisit_Continue = 1,
+    }
+}
+
+cenum! {
+    enum CX_CXXAccessSpecifier {
+        const CX_CXXInvalidAccessSpecifier = 0,
+        const CX_CXXPublic = 1,
+        const CX_CXXProtected = 2,
+        const CX_CXXPrivate = 3,
+    }
+}
+
+cenum! {
+    #[cfg(feature="gte_clang_3_6")]
+    enum CX_StorageClass {
+        const CX_SC_Invalid = 0,
+        const CX_SC_None = 1,
+        const CX_SC_Extern = 2,
+        const CX_SC_Static = 3,
+        const CX_SC_PrivateExtern = 4,
+        const CX_SC_OpenCLWorkGroupLocal = 5,
+        const CX_SC_Auto = 6,
+        const CX_SC_Register = 7,
+    }
+}
+
+//================================================
+// Flags
+//================================================
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXCodeComplete_Flags: c_uint {
+        const CXCodeComplete_IncludeMacros = 1;
+        const CXCodeComplete_IncludeCodePatterns = 2;
+        const CXCodeComplete_IncludeBriefComments = 4;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXCompletionContext: c_uint {
+        const CXCompletionContext_Unexposed = 0;
+        const CXCompletionContext_AnyType = 1;
+        const CXCompletionContext_AnyValue = 2;
+        const CXCompletionContext_ObjCObjectValue = 4;
+        const CXCompletionContext_ObjCSelectorValue = 8;
+        const CXCompletionContext_CXXClassTypeValue = 16;
+        const CXCompletionContext_DotMemberAccess = 32;
+        const CXCompletionContext_ArrowMemberAccess = 64;
+        const CXCompletionContext_ObjCPropertyAccess = 128;
+        const CXCompletionContext_EnumTag = 256;
+        const CXCompletionContext_UnionTag = 512;
+        const CXCompletionContext_StructTag = 1024;
+        const CXCompletionContext_ClassTag = 2048;
+        const CXCompletionContext_Namespace = 4096;
+        const CXCompletionContext_NestedNameSpecifier = 8192;
+        const CXCompletionContext_ObjCInterface = 16384;
+        const CXCompletionContext_ObjCProtocol = 32768;
+        const CXCompletionContext_ObjCCategory = 65536;
+        const CXCompletionContext_ObjCInstanceMessage = 131072;
+        const CXCompletionContext_ObjCClassMessage = 262144;
+        const CXCompletionContext_ObjCSelectorName = 524288;
+        const CXCompletionContext_MacroName = 1048576;
+        const CXCompletionContext_NaturalLanguage = 2097152;
+        const CXCompletionContext_Unknown = 4194303;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXDiagnosticDisplayOptions: c_uint {
+        const CXDiagnostic_DisplaySourceLocation = 1;
+        const CXDiagnostic_DisplayColumn = 2;
+        const CXDiagnostic_DisplaySourceRanges = 4;
+        const CXDiagnostic_DisplayOption = 8;
+        const CXDiagnostic_DisplayCategoryId = 16;
+        const CXDiagnostic_DisplayCategoryName = 32;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXGlobalOptFlags: c_uint {
+        const CXGlobalOpt_None = 0;
+        const CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 1;
+        const CXGlobalOpt_ThreadBackgroundPriorityForEditing = 2;
+        const CXGlobalOpt_ThreadBackgroundPriorityForAll = 3;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXIdxDeclInfoFlags: c_uint {
+        const CXIdxDeclFlag_Skipped = 1;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXIndexOptFlags: c_uint {
+        const CXIndexOptNone = 0;
+        const CXIndexOptSuppressRedundantRefs = 1;
+        const CXIndexOptIndexFunctionLocalSymbols = 2;
+        const CXIndexOptIndexImplicitTemplateInstantiations = 4;
+        const CXIndexOptSuppressWarnings = 8;
+        const CXIndexOptSkipParsedBodiesInSession = 16;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXNameRefFlags: c_uint {
+        const CXNameRange_WantQualifier = 1;
+        const CXNameRange_WantTemplateArgs = 2;
+        const CXNameRange_WantSinglePiece = 4;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXObjCDeclQualifierKind: c_uint {
+        const CXObjCDeclQualifier_None = 0;
+        const CXObjCDeclQualifier_In = 1;
+        const CXObjCDeclQualifier_Inout = 2;
+        const CXObjCDeclQualifier_Out = 4;
+        const CXObjCDeclQualifier_Bycopy = 8;
+        const CXObjCDeclQualifier_Byref = 16;
+        const CXObjCDeclQualifier_Oneway = 32;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXObjCPropertyAttrKind: c_uint {
+        const CXObjCPropertyAttr_noattr = 0;
+        const CXObjCPropertyAttr_readonly = 1;
+        const CXObjCPropertyAttr_getter = 2;
+        const CXObjCPropertyAttr_assign = 4;
+        const CXObjCPropertyAttr_readwrite = 8;
+        const CXObjCPropertyAttr_retain = 16;
+        const CXObjCPropertyAttr_copy = 32;
+        const CXObjCPropertyAttr_nonatomic = 64;
+        const CXObjCPropertyAttr_setter = 128;
+        const CXObjCPropertyAttr_atomic = 256;
+        const CXObjCPropertyAttr_weak = 512;
+        const CXObjCPropertyAttr_strong = 1024;
+        const CXObjCPropertyAttr_unsafe_unretained = 2048;
+        #[cfg(feature="gte_clang_3_9")]
+        const CXObjCPropertyAttr_class = 4096;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXReparse_Flags: c_uint {
+        const CXReparse_None = 0;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXSaveTranslationUnit_Flags: c_uint {
+        const CXSaveTranslationUnit_None = 0;
+    }
+}
+
+bitflags! {
+    #[repr(C)]
+    pub struct CXTranslationUnit_Flags: c_uint {
+        const CXTranslationUnit_None = 0;
+        const CXTranslationUnit_DetailedPreprocessingRecord = 1;
+        const CXTranslationUnit_Incomplete = 2;
+        const CXTranslationUnit_PrecompiledPreamble = 4;
+        const CXTranslationUnit_CacheCompletionResults = 8;
+        const CXTranslationUnit_ForSerialization = 16;
+        const CXTranslationUnit_CXXChainedPCH = 32;
+        const CXTranslationUnit_SkipFunctionBodies = 64;
+        const CXTranslationUnit_IncludeBriefCommentsInCodeCompletion = 128;
+        #[cfg(feature="gte_clang_3_8")]
+        const CXTranslationUnit_CreatePreambleOnFirstParse = 256;
+        #[cfg(feature="gte_clang_3_9")]
+        const CXTranslationUnit_KeepGoing = 512;
+    }
+}
+
+//================================================
+// Structs
+//================================================
+
+// Opaque ________________________________________
+
+macro_rules! opaque { ($name:ident) => (pub type $name = *mut c_void;); }
+
+opaque!(CXCompilationDatabase);
+opaque!(CXCompileCommand);
+opaque!(CXCompileCommands);
+opaque!(CXCompletionString);
+opaque!(CXCursorSet);
+opaque!(CXDiagnostic);
+opaque!(CXDiagnosticSet);
+#[cfg(feature="gte_clang_3_9")]
+opaque!(CXEvalResult);
+opaque!(CXFile);
+opaque!(CXIdxClientASTFile);
+opaque!(CXIdxClientContainer);
+opaque!(CXIdxClientEntity);
+opaque!(CXIdxClientFile);
+opaque!(CXIndex);
+opaque!(CXIndexAction);
+opaque!(CXModule);
+opaque!(CXRemapping);
+opaque!(CXTranslationUnit);
+
+// Transparent ___________________________________
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXCodeCompleteResults {
+    pub Results: *mut CXCompletionResult,
+    pub NumResults: c_uint,
+}
+
+default!(CXCodeCompleteResults);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXComment {
+    pub ASTNode: *const c_void,
+    pub TranslationUnit: CXTranslationUnit,
+}
+
+default!(CXComment);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXCompletionResult {
+    pub CursorKind: CXCursorKind,
+    pub CompletionString: CXCompletionString,
+}
+
+default!(CXCompletionResult);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXCursor {
+    pub kind: CXCursorKind,
+    pub xdata: c_int,
+    pub data: [*const c_void; 3],
+}
+
+default!(CXCursor);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXCursorAndRangeVisitor {
+    pub context: *mut c_void,
+    pub visit: extern fn(*mut c_void, CXCursor, CXSourceRange) -> CXVisitorResult,
+}
+
+default!(CXCursorAndRangeVisitor);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXFileUniqueID {
+    pub data: [c_ulonglong; 3],
+}
+
+default!(CXFileUniqueID);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxAttrInfo {
+    pub kind: CXIdxAttrKind,
+    pub cursor: CXCursor,
+    pub loc: CXIdxLoc,
+}
+
+default!(CXIdxAttrInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxBaseClassInfo {
+    pub base: *const CXIdxEntityInfo,
+    pub cursor: CXCursor,
+    pub loc: CXIdxLoc,
+}
+
+default!(CXIdxBaseClassInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxCXXClassDeclInfo {
+    pub declInfo: *const CXIdxDeclInfo,
+    pub bases: *const *const CXIdxBaseClassInfo,
+    pub numBases: c_uint,
+}
+
+default!(CXIdxCXXClassDeclInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxContainerInfo {
+    pub cursor: CXCursor,
+}
+
+default!(CXIdxContainerInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxDeclInfo {
+    pub entityInfo: *const CXIdxEntityInfo,
+    pub cursor: CXCursor,
+    pub loc: CXIdxLoc,
+    pub semanticContainer: *const CXIdxContainerInfo,
+    pub lexicalContainer: *const CXIdxContainerInfo,
+    pub isRedeclaration: c_int,
+    pub isDefinition: c_int,
+    pub isContainer: c_int,
+    pub declAsContainer: *const CXIdxContainerInfo,
+    pub isImplicit: c_int,
+    pub attributes: *const *const CXIdxAttrInfo,
+    pub numAttributes: c_uint,
+    pub flags: c_uint,
+}
+
+default!(CXIdxDeclInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxEntityInfo {
+    pub kind: CXIdxEntityKind,
+    pub templateKind: CXIdxEntityCXXTemplateKind,
+    pub lang: CXIdxEntityLanguage,
+    pub name: *const c_char,
+    pub USR: *const c_char,
+    pub cursor: CXCursor,
+    pub attributes: *const *const CXIdxAttrInfo,
+    pub numAttributes: c_uint,
+}
+
+default!(CXIdxEntityInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxEntityRefInfo {
+    pub kind: CXIdxEntityRefKind,
+    pub cursor: CXCursor,
+    pub loc: CXIdxLoc,
+    pub referencedEntity: *const CXIdxEntityInfo,
+    pub parentEntity: *const CXIdxEntityInfo,
+    pub container: *const CXIdxContainerInfo,
+}
+
+default!(CXIdxEntityRefInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxIBOutletCollectionAttrInfo {
+    pub attrInfo: *const CXIdxAttrInfo,
+    pub objcClass: *const CXIdxEntityInfo,
+    pub classCursor: CXCursor,
+    pub classLoc: CXIdxLoc,
+}
+
+default!(CXIdxIBOutletCollectionAttrInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxImportedASTFileInfo {
+    pub file: CXFile,
+    pub module: CXModule,
+    pub loc: CXIdxLoc,
+    pub isImplicit: c_int,
+}
+
+default!(CXIdxImportedASTFileInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxIncludedFileInfo {
+    pub hashLoc: CXIdxLoc,
+    pub filename: *const c_char,
+    pub file: CXFile,
+    pub isImport: c_int,
+    pub isAngled: c_int,
+    pub isModuleImport: c_int,
+}
+
+default!(CXIdxIncludedFileInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxLoc {
+    pub ptr_data: [*mut c_void; 2],
+    pub int_data: c_uint,
+}
+
+default!(CXIdxLoc);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxObjCCategoryDeclInfo {
+    pub containerInfo: *const CXIdxObjCContainerDeclInfo,
+    pub objcClass: *const CXIdxEntityInfo,
+    pub classCursor: CXCursor,
+    pub classLoc: CXIdxLoc,
+    pub protocols: *const CXIdxObjCProtocolRefListInfo,
+}
+
+default!(CXIdxObjCCategoryDeclInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxObjCContainerDeclInfo {
+    pub declInfo: *const CXIdxDeclInfo,
+    pub kind: CXIdxObjCContainerKind,
+}
+
+default!(CXIdxObjCContainerDeclInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxObjCInterfaceDeclInfo {
+    pub containerInfo: *const CXIdxObjCContainerDeclInfo,
+    pub superInfo: *const CXIdxBaseClassInfo,
+    pub protocols: *const CXIdxObjCProtocolRefListInfo,
+}
+
+default!(CXIdxObjCInterfaceDeclInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxObjCPropertyDeclInfo {
+    pub declInfo: *const CXIdxDeclInfo,
+    pub getter: *const CXIdxEntityInfo,
+    pub setter: *const CXIdxEntityInfo,
+}
+
+default!(CXIdxObjCPropertyDeclInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxObjCProtocolRefInfo {
+    pub protocol: *const CXIdxEntityInfo,
+    pub cursor: CXCursor,
+    pub loc: CXIdxLoc,
+}
+
+default!(CXIdxObjCProtocolRefInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXIdxObjCProtocolRefListInfo {
+    pub protocols: *const *const CXIdxObjCProtocolRefInfo,
+    pub numProtocols: c_uint,
+}
+
+default!(CXIdxObjCProtocolRefListInfo);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXPlatformAvailability {
+    pub Platform: CXString,
+    pub Introduced: CXVersion,
+    pub Deprecated: CXVersion,
+    pub Obsoleted: CXVersion,
+    pub Unavailable: c_int,
+    pub Message: CXString,
+}
+
+default!(CXPlatformAvailability);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXSourceLocation {
+    pub ptr_data: [*const c_void; 2],
+    pub int_data: c_uint,
+}
+
+default!(CXSourceLocation);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXSourceRange {
+    pub ptr_data: [*const c_void; 2],
+    pub begin_int_data: c_uint,
+    pub end_int_data: c_uint,
+}
+
+default!(CXSourceRange);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXSourceRangeList {
+    pub count: c_uint,
+    pub ranges: *mut CXSourceRange,
+}
+
+default!(CXSourceRangeList);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXString {
+    pub data: *const c_void,
+    pub private_flags: c_uint,
+}
+
+default!(CXString);
+
+#[cfg(feature="gte_clang_3_8")]
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXStringSet {
+    pub Strings: *mut CXString,
+    pub Count: c_uint,
+}
+
+default!(#[cfg(feature="gte_clang_3_8")] CXStringSet);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXTUResourceUsage {
+    pub data: *mut c_void,
+    pub numEntries: c_uint,
+    pub entries: *mut CXTUResourceUsageEntry,
+}
+
+default!(CXTUResourceUsage);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXTUResourceUsageEntry {
+    pub kind: CXTUResourceUsageKind,
+    pub amount: c_ulong,
+}
+
+default!(CXTUResourceUsageEntry);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXToken {
+    pub int_data: [c_uint; 4],
+    pub ptr_data: *mut c_void,
+}
+
+default!(CXToken);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXType {
+    pub kind: CXTypeKind,
+    pub data: [*mut c_void; 2],
+}
+
+default!(CXType);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXUnsavedFile {
+    pub Filename: *const c_char,
+    pub Contents: *const c_char,
+    pub Length: c_ulong,
+}
+
+default!(CXUnsavedFile);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXVersion {
+    pub Major: c_int,
+    pub Minor: c_int,
+    pub Subminor: c_int,
+}
+
+default!(CXVersion);
+
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct IndexerCallbacks {
+    pub abortQuery: extern fn(CXClientData, *mut c_void) -> c_int,
+    pub diagnostic: extern fn(CXClientData, CXDiagnosticSet, *mut c_void),
+    pub enteredMainFile: extern fn(CXClientData, CXFile, *mut c_void) -> CXIdxClientFile,
+    pub ppIncludedFile: extern fn(CXClientData, *const CXIdxIncludedFileInfo) -> CXIdxClientFile,
+    pub importedASTFile: extern fn(CXClientData, *const CXIdxImportedASTFileInfo) -> CXIdxClientASTFile,
+    pub startedTranslationUnit: extern fn(CXClientData, *mut c_void) -> CXIdxClientContainer,
+    pub indexDeclaration: extern fn(CXClientData, *const CXIdxDeclInfo),
+    pub indexEntityReference: extern fn(CXClientData, *const CXIdxEntityRefInfo),
+}
+
+default!(IndexerCallbacks);
+
+//================================================
+// Functions
+//================================================
+
+link! {
+    pub fn clang_CXCursorSet_contains(set: CXCursorSet, cursor: CXCursor) -> c_uint;
+    pub fn clang_CXCursorSet_insert(set: CXCursorSet, cursor: CXCursor) -> c_uint;
+    pub fn clang_CXIndex_getGlobalOptions(index: CXIndex) -> CXGlobalOptFlags;
+    pub fn clang_CXIndex_setGlobalOptions(index: CXIndex, flags: CXGlobalOptFlags);
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_CXXConstructor_isConvertingConstructor(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_CXXConstructor_isCopyConstructor(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_CXXConstructor_isDefaultConstructor(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_CXXConstructor_isMoveConstructor(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_CXXField_isMutable(cursor: CXCursor) -> c_uint;
+    pub fn clang_CXXMethod_isConst(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_CXXMethod_isDefaulted(cursor: CXCursor) -> c_uint;
+    pub fn clang_CXXMethod_isPureVirtual(cursor: CXCursor) -> c_uint;
+    pub fn clang_CXXMethod_isStatic(cursor: CXCursor) -> c_uint;
+    pub fn clang_CXXMethod_isVirtual(cursor: CXCursor) -> c_uint;
+    pub fn clang_CompilationDatabase_dispose(database: CXCompilationDatabase);
+    pub fn clang_CompilationDatabase_fromDirectory(directory: *const c_char, error: *mut CXCompilationDatabase_Error) -> CXCompilationDatabase;
+    pub fn clang_CompilationDatabase_getAllCompileCommands(database: CXCompilationDatabase) -> CXCompileCommands;
+    pub fn clang_CompilationDatabase_getCompileCommands(database: CXCompilationDatabase, filename: *const c_char) -> CXCompileCommands;
+    pub fn clang_CompileCommand_getArg(command: CXCompileCommand, index: c_uint) -> CXString;
+    pub fn clang_CompileCommand_getDirectory(command: CXCompileCommand) -> CXString;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_CompileCommand_getFilename(command: CXCompileCommand) -> CXString;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_CompileCommand_getMappedSourceContent(command: CXCompileCommand, index: c_uint) -> CXString;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_CompileCommand_getMappedSourcePath(command: CXCompileCommand, index: c_uint) -> CXString;
+    pub fn clang_CompileCommand_getNumArgs(command: CXCompileCommand) -> c_uint;
+    pub fn clang_CompileCommands_dispose(command: CXCompileCommands);
+    pub fn clang_CompileCommands_getCommand(command: CXCompileCommands, index: c_uint) -> CXCompileCommand;
+    pub fn clang_CompileCommands_getSize(command: CXCompileCommands) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Cursor_Evaluate(cursor: CXCursor) -> CXEvalResult;
+    pub fn clang_Cursor_getArgument(cursor: CXCursor, index: c_uint) -> CXCursor;
+    pub fn clang_Cursor_getBriefCommentText(cursor: CXCursor) -> CXString;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_Cursor_getCXXManglings(cursor: CXCursor) -> *mut CXStringSet;
+    pub fn clang_Cursor_getCommentRange(cursor: CXCursor) -> CXSourceRange;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getMangling(cursor: CXCursor) -> CXString;
+    pub fn clang_Cursor_getModule(cursor: CXCursor) -> CXModule;
+    pub fn clang_Cursor_getNumArguments(cursor: CXCursor) -> c_int;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getNumTemplateArguments(cursor: CXCursor) -> c_int;
+    pub fn clang_Cursor_getObjCDeclQualifiers(cursor: CXCursor) -> CXObjCDeclQualifierKind;
+    pub fn clang_Cursor_getObjCPropertyAttributes(cursor: CXCursor, reserved: c_uint) -> CXObjCPropertyAttrKind;
+    pub fn clang_Cursor_getObjCSelectorIndex(cursor: CXCursor) -> c_int;
+    #[cfg(feature="gte_clang_3_7")]
+    pub fn clang_Cursor_getOffsetOfField(cursor: CXCursor) -> c_longlong;
+    pub fn clang_Cursor_getRawCommentText(cursor: CXCursor) -> CXString;
+    pub fn clang_Cursor_getReceiverType(cursor: CXCursor) -> CXType;
+    pub fn clang_Cursor_getSpellingNameRange(cursor: CXCursor, index: c_uint, reserved: c_uint) -> CXSourceRange;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getStorageClass(cursor: CXCursor) -> CX_StorageClass;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getTemplateArgumentKind(cursor: CXCursor, index: c_uint) -> CXTemplateArgumentKind;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getTemplateArgumentType(cursor: CXCursor, index: c_uint) -> CXType;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getTemplateArgumentUnsignedValue(cursor: CXCursor, index: c_uint) -> c_ulonglong;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_Cursor_getTemplateArgumentValue(cursor: CXCursor, index: c_uint) -> c_longlong;
+    pub fn clang_Cursor_getTranslationUnit(cursor: CXCursor) -> CXTranslationUnit;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Cursor_hasAttrs(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_7")]
+    pub fn clang_Cursor_isAnonymous(cursor: CXCursor) -> c_uint;
+    pub fn clang_Cursor_isBitField(cursor: CXCursor) -> c_uint;
+    pub fn clang_Cursor_isDynamicCall(cursor: CXCursor) -> c_int;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Cursor_isFunctionInlined(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Cursor_isMacroBuiltin(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Cursor_isMacroFunctionLike(cursor: CXCursor) -> c_uint;
+    pub fn clang_Cursor_isNull(cursor: CXCursor) -> c_int;
+    pub fn clang_Cursor_isObjCOptional(cursor: CXCursor) -> c_uint;
+    pub fn clang_Cursor_isVariadic(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_EvalResult_dispose(result: CXEvalResult);
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_EvalResult_getAsDouble(result: CXEvalResult) -> libc::c_double;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_EvalResult_getAsInt(result: CXEvalResult) -> c_int;
+    #[cfg(feature="gte_clang_4_0")]
+    pub fn clang_EvalResult_getAsLongLong(result: CXEvalResult) -> c_longlong;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_EvalResult_getAsStr(result: CXEvalResult) -> *const c_char;
+    #[cfg(feature="gte_clang_4_0")]
+    pub fn clang_EvalResult_getAsUnsigned(result: CXEvalResult) -> c_ulonglong;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_EvalResult_getKind(result: CXEvalResult) -> CXEvalResultKind;
+    #[cfg(feature="gte_clang_4_0")]
+    pub fn clang_EvalResult_isUnsignedInt(result: CXEvalResult) -> c_uint;
+    #[cfg(feature="gte_clang_3_6")]
+    pub fn clang_File_isEqual(left: CXFile, right: CXFile) -> c_int;
+    pub fn clang_IndexAction_create(index: CXIndex) -> CXIndexAction;
+    pub fn clang_IndexAction_dispose(index: CXIndexAction);
+    pub fn clang_Location_isFromMainFile(location: CXSourceLocation) -> c_int;
+    pub fn clang_Location_isInSystemHeader(location: CXSourceLocation) -> c_int;
+    pub fn clang_Module_getASTFile(module: CXModule) -> CXFile;
+    pub fn clang_Module_getFullName(module: CXModule) -> CXString;
+    pub fn clang_Module_getName(module: CXModule) -> CXString;
+    pub fn clang_Module_getNumTopLevelHeaders(tu: CXTranslationUnit, module: CXModule) -> c_uint;
+    pub fn clang_Module_getParent(module: CXModule) -> CXModule;
+    pub fn clang_Module_getTopLevelHeader(tu: CXTranslationUnit, module: CXModule, index: c_uint) -> CXFile;
+    pub fn clang_Module_isSystem(module: CXModule) -> c_int;
+    pub fn clang_Range_isNull(range: CXSourceRange) -> c_int;
+    pub fn clang_Type_getAlignOf(type_: CXType) -> c_longlong;
+    pub fn clang_Type_getCXXRefQualifier(type_: CXType) -> CXRefQualifierKind;
+    pub fn clang_Type_getClassType(type_: CXType) -> CXType;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Type_getNamedType(type_: CXType) -> CXType;
+    pub fn clang_Type_getNumTemplateArguments(type_: CXType) -> c_int;
+    #[cfg(feature="gte_clang_3_9")]
+    pub fn clang_Type_getObjCEncoding(type_: CXType) -> CXString;
+    pub fn clang_Type_getOffsetOf(type_: CXType, field: *const c_char) -> c_longlong;
+    pub fn clang_Type_getSizeOf(type_: CXType) -> c_longlong;
+    pub fn clang_Type_getTemplateArgumentAsType(type_: CXType, index: c_uint) -> CXType;
+    #[cfg(feature="gte_clang_3_7")]
+    pub fn clang_Type_visitFields(type_: CXType, visitor: CXFieldVisitor, data: CXClientData) -> CXVisitorResult;
+    pub fn clang_annotateTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint, cursors: *mut CXCursor);
+    pub fn clang_codeCompleteAt(tu: CXTranslationUnit, file: *const c_char, line: c_uint, column: c_uint, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXCodeComplete_Flags) -> *mut CXCodeCompleteResults;
+    pub fn clang_codeCompleteGetContainerKind(results: *mut CXCodeCompleteResults, incomplete: *mut c_uint) -> CXCursorKind;
+    pub fn clang_codeCompleteGetContainerUSR(results: *mut CXCodeCompleteResults) -> CXString;
+    pub fn clang_codeCompleteGetContexts(results: *mut CXCodeCompleteResults) -> c_ulonglong;
+    pub fn clang_codeCompleteGetDiagnostic(results: *mut CXCodeCompleteResults, index: c_uint) -> CXDiagnostic;
+    pub fn clang_codeCompleteGetNumDiagnostics(results: *mut CXCodeCompleteResults) -> c_uint;
+    pub fn clang_codeCompleteGetObjCSelector(results: *mut CXCodeCompleteResults) -> CXString;
+    pub fn clang_constructUSR_ObjCCategory(class: *const c_char, category: *const c_char) -> CXString;
+    pub fn clang_constructUSR_ObjCClass(class: *const c_char) -> CXString;
+    pub fn clang_constructUSR_ObjCIvar(name: *const c_char, usr: CXString) -> CXString;
+    pub fn clang_constructUSR_ObjCMethod(name: *const c_char, instance: c_uint, usr: CXString) -> CXString;
+    pub fn clang_constructUSR_ObjCProperty(property: *const c_char, usr: CXString) -> CXString;
+    pub fn clang_constructUSR_ObjCProtocol(protocol: *const c_char) -> CXString;
+    pub fn clang_createCXCursorSet() -> CXCursorSet;
+    pub fn clang_createIndex(exclude: c_int, display: c_int) -> CXIndex;
+    pub fn clang_createTranslationUnit(index: CXIndex, file: *const c_char) -> CXTranslationUnit;
+    pub fn clang_createTranslationUnit2(index: CXIndex, file: *const c_char, tu: *mut CXTranslationUnit) -> CXErrorCode;
+    pub fn clang_createTranslationUnitFromSourceFile(index: CXIndex, file: *const c_char, n_arguments: c_int, arguments: *const *const c_char, n_unsaved: c_uint, unsaved: *mut CXUnsavedFile) -> CXTranslationUnit;
+    pub fn clang_defaultCodeCompleteOptions() -> CXCodeComplete_Flags;
+    pub fn clang_defaultDiagnosticDisplayOptions() -> CXDiagnosticDisplayOptions;
+    pub fn clang_defaultEditingTranslationUnitOptions() -> CXTranslationUnit_Flags;
+    pub fn clang_defaultReparseOptions(tu: CXTranslationUnit) -> CXReparse_Flags;
+    pub fn clang_defaultSaveOptions(tu: CXTranslationUnit) -> CXSaveTranslationUnit_Flags;
+    pub fn clang_disposeCXCursorSet(set: CXCursorSet);
+    pub fn clang_disposeCXPlatformAvailability(availability: *mut CXPlatformAvailability);
+    pub fn clang_disposeCXTUResourceUsage(usage: CXTUResourceUsage);
+    pub fn clang_disposeCodeCompleteResults(results: *mut CXCodeCompleteResults);
+    pub fn clang_disposeDiagnostic(diagnostic: CXDiagnostic);
+    pub fn clang_disposeDiagnosticSet(diagnostic: CXDiagnosticSet);
+    pub fn clang_disposeIndex(index: CXIndex);
+    pub fn clang_disposeOverriddenCursors(cursors: *mut CXCursor);
+    pub fn clang_disposeSourceRangeList(list: *mut CXSourceRangeList);
+    pub fn clang_disposeString(string: CXString);
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_disposeStringSet(set: *mut CXStringSet);
+    pub fn clang_disposeTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint);
+    pub fn clang_disposeTranslationUnit(tu: CXTranslationUnit);
+    pub fn clang_enableStackTraces();
+    pub fn clang_equalCursors(left: CXCursor, right: CXCursor) -> c_uint;
+    pub fn clang_equalLocations(left: CXSourceLocation, right: CXSourceLocation) -> c_uint;
+    pub fn clang_equalRanges(left: CXSourceRange, right: CXSourceRange) -> c_uint;
+    pub fn clang_equalTypes(left: CXType, right: CXType) -> c_uint;
+    pub fn clang_executeOnThread(function: extern fn(*mut c_void), data: *mut c_void, stack: c_uint);
+    pub fn clang_findIncludesInFile(tu: CXTranslationUnit, file: CXFile, cursor: CXCursorAndRangeVisitor) -> CXResult;
+    pub fn clang_findReferencesInFile(cursor: CXCursor, file: CXFile, visitor: CXCursorAndRangeVisitor) -> CXResult;
+    pub fn clang_formatDiagnostic(diagnostic: CXDiagnostic, flags: CXDiagnosticDisplayOptions) -> CXString;
+    #[cfg(feature="gte_clang_3_7")]
+    pub fn clang_free(buffer: *mut c_void);
+    #[cfg(feature="gte_clang_4_0")]
+    pub fn clang_getAllSkippedRanges(tu: CXTranslationUnit) -> *mut CXSourceRangeList;
+    pub fn clang_getArgType(type_: CXType, index: c_uint) -> CXType;
+    pub fn clang_getArrayElementType(type_: CXType) -> CXType;
+    pub fn clang_getArraySize(type_: CXType) -> c_longlong;
+    pub fn clang_getCString(string: CXString) -> *const c_char;
+    pub fn clang_getCXTUResourceUsage(tu: CXTranslationUnit) -> CXTUResourceUsage;
+    pub fn clang_getCXXAccessSpecifier(cursor: CXCursor) -> CX_CXXAccessSpecifier;
+    pub fn clang_getCanonicalCursor(cursor: CXCursor) -> CXCursor;
+    pub fn clang_getCanonicalType(type_: CXType) -> CXType;
+    pub fn clang_getChildDiagnostics(diagnostic: CXDiagnostic) -> CXDiagnosticSet;
+    pub fn clang_getClangVersion() -> CXString;
+    pub fn clang_getCompletionAnnotation(string: CXCompletionString, index: c_uint) -> CXString;
+    pub fn clang_getCompletionAvailability(string: CXCompletionString) -> CXAvailabilityKind;
+    pub fn clang_getCompletionBriefComment(string: CXCompletionString) -> CXString;
+    pub fn clang_getCompletionChunkCompletionString(string: CXCompletionString, index: c_uint) -> CXCompletionString;
+    pub fn clang_getCompletionChunkKind(string: CXCompletionString, index: c_uint) -> CXCompletionChunkKind;
+    pub fn clang_getCompletionChunkText(string: CXCompletionString, index: c_uint) -> CXString;
+    pub fn clang_getCompletionNumAnnotations(string: CXCompletionString) -> c_uint;
+    pub fn clang_getCompletionParent(string: CXCompletionString, kind: *mut CXCursorKind) -> CXString;
+    pub fn clang_getCompletionPriority(string: CXCompletionString) -> c_uint;
+    pub fn clang_getCursor(tu: CXTranslationUnit, location: CXSourceLocation) -> CXCursor;
+    pub fn clang_getCursorAvailability(cursor: CXCursor) -> CXAvailabilityKind;
+    pub fn clang_getCursorCompletionString(cursor: CXCursor) -> CXCompletionString;
+    pub fn clang_getCursorDefinition(cursor: CXCursor) -> CXCursor;
+    pub fn clang_getCursorDisplayName(cursor: CXCursor) -> CXString;
+    pub fn clang_getCursorExtent(cursor: CXCursor) -> CXSourceRange;
+    pub fn clang_getCursorKind(cursor: CXCursor) -> CXCursorKind;
+    pub fn clang_getCursorKindSpelling(kind: CXCursorKind) -> CXString;
+    pub fn clang_getCursorLanguage(cursor: CXCursor) -> CXLanguageKind;
+    pub fn clang_getCursorLexicalParent(cursor: CXCursor) -> CXCursor;
+    pub fn clang_getCursorLinkage(cursor: CXCursor) -> CXLinkageKind;
+    pub fn clang_getCursorLocation(cursor: CXCursor) -> CXSourceLocation;
+    pub fn clang_getCursorPlatformAvailability(cursor: CXCursor, deprecated: *mut c_int, deprecated_message: *mut CXString, unavailable: *mut c_int, unavailable_message: *mut CXString, availability: *mut CXPlatformAvailability, n_availability: c_int) -> c_int;
+    pub fn clang_getCursorReferenceNameRange(cursor: CXCursor, flags: CXNameRefFlags, index: c_uint) -> CXSourceRange;
+    pub fn clang_getCursorReferenced(cursor: CXCursor) -> CXCursor;
+    pub fn clang_getCursorResultType(cursor: CXCursor) -> CXType;
+    pub fn clang_getCursorSemanticParent(cursor: CXCursor) -> CXCursor;
+    pub fn clang_getCursorSpelling(cursor: CXCursor) -> CXString;
+    pub fn clang_getCursorType(cursor: CXCursor) -> CXType;
+    pub fn clang_getCursorUSR(cursor: CXCursor) -> CXString;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_getCursorVisibility(cursor: CXCursor) -> CXVisibilityKind;
+    pub fn clang_getDeclObjCTypeEncoding(cursor: CXCursor) -> CXString;
+    pub fn clang_getDefinitionSpellingAndExtent(cursor: CXCursor, start: *mut *const c_char, end: *mut *const c_char, start_line: *mut c_uint, start_column: *mut c_uint, end_line: *mut c_uint, end_column: *mut c_uint);
+    pub fn clang_getDiagnostic(tu: CXTranslationUnit, index: c_uint) -> CXDiagnostic;
+    pub fn clang_getDiagnosticCategory(diagnostic: CXDiagnostic) -> c_uint;
+    pub fn clang_getDiagnosticCategoryName(category: c_uint) -> CXString;
+    pub fn clang_getDiagnosticCategoryText(diagnostic: CXDiagnostic) -> CXString;
+    pub fn clang_getDiagnosticFixIt(diagnostic: CXDiagnostic, index: c_uint, range: *mut CXSourceRange) -> CXString;
+    pub fn clang_getDiagnosticInSet(diagnostic: CXDiagnosticSet, index: c_uint) -> CXDiagnostic;
+    pub fn clang_getDiagnosticLocation(diagnostic: CXDiagnostic) -> CXSourceLocation;
+    pub fn clang_getDiagnosticNumFixIts(diagnostic: CXDiagnostic) -> c_uint;
+    pub fn clang_getDiagnosticNumRanges(diagnostic: CXDiagnostic) -> c_uint;
+    pub fn clang_getDiagnosticOption(diagnostic: CXDiagnostic, option: *mut CXString) -> CXString;
+    pub fn clang_getDiagnosticRange(diagnostic: CXDiagnostic, index: c_uint) -> CXSourceRange;
+    pub fn clang_getDiagnosticSetFromTU(tu: CXTranslationUnit) -> CXDiagnosticSet;
+    pub fn clang_getDiagnosticSeverity(diagnostic: CXDiagnostic) -> CXDiagnosticSeverity;
+    pub fn clang_getDiagnosticSpelling(diagnostic: CXDiagnostic) -> CXString;
+    pub fn clang_getElementType(type_: CXType) -> CXType;
+    pub fn clang_getEnumConstantDeclUnsignedValue(cursor: CXCursor) -> c_ulonglong;
+    pub fn clang_getEnumConstantDeclValue(cursor: CXCursor) -> c_longlong;
+    pub fn clang_getEnumDeclIntegerType(cursor: CXCursor) -> CXType;
+    pub fn clang_getExpansionLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
+    pub fn clang_getFieldDeclBitWidth(cursor: CXCursor) -> c_int;
+    pub fn clang_getFile(tu: CXTranslationUnit, file: *const c_char) -> CXFile;
+    pub fn clang_getFileLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
+    pub fn clang_getFileName(file: CXFile) -> CXString;
+    pub fn clang_getFileTime(file: CXFile) -> time_t;
+    pub fn clang_getFileUniqueID(file: CXFile, id: *mut CXFileUniqueID) -> c_int;
+    pub fn clang_getFunctionTypeCallingConv(type_: CXType) -> CXCallingConv;
+    pub fn clang_getIBOutletCollectionType(cursor: CXCursor) -> CXType;
+    pub fn clang_getIncludedFile(cursor: CXCursor) -> CXFile;
+    pub fn clang_getInclusions(tu: CXTranslationUnit, visitor: CXInclusionVisitor, data: CXClientData);
+    pub fn clang_getInstantiationLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
+    pub fn clang_getLocation(tu: CXTranslationUnit, file: CXFile, line: c_uint, column: c_uint) -> CXSourceLocation;
+    pub fn clang_getLocationForOffset(tu: CXTranslationUnit, file: CXFile, offset: c_uint) -> CXSourceLocation;
+    pub fn clang_getModuleForFile(tu: CXTranslationUnit, file: CXFile) -> CXModule;
+    pub fn clang_getNullCursor() -> CXCursor;
+    pub fn clang_getNullLocation() -> CXSourceLocation;
+    pub fn clang_getNullRange() -> CXSourceRange;
+    pub fn clang_getNumArgTypes(type_: CXType) -> c_int;
+    pub fn clang_getNumCompletionChunks(string: CXCompletionString) -> c_uint;
+    pub fn clang_getNumDiagnostics(tu: CXTranslationUnit) -> c_uint;
+    pub fn clang_getNumDiagnosticsInSet(diagnostic: CXDiagnosticSet) -> c_uint;
+    pub fn clang_getNumElements(type_: CXType) -> c_longlong;
+    pub fn clang_getNumOverloadedDecls(cursor: CXCursor) -> c_uint;
+    pub fn clang_getOverloadedDecl(cursor: CXCursor, index: c_uint) -> CXCursor;
+    pub fn clang_getOverriddenCursors(cursor: CXCursor, cursors: *mut *mut CXCursor, n_cursors: *mut c_uint);
+    pub fn clang_getPointeeType(type_: CXType) -> CXType;
+    pub fn clang_getPresumedLocation(location: CXSourceLocation, file: *mut CXString, line: *mut c_uint, column: *mut c_uint);
+    pub fn clang_getRange(start: CXSourceLocation, end: CXSourceLocation) -> CXSourceRange;
+    pub fn clang_getRangeEnd(range: CXSourceRange) -> CXSourceLocation;
+    pub fn clang_getRangeStart(range: CXSourceRange) -> CXSourceLocation;
+    pub fn clang_getRemappings(file: *const c_char) -> CXRemapping;
+    pub fn clang_getRemappingsFromFileList(files: *mut *const c_char, n_files: c_uint) -> CXRemapping;
+    pub fn clang_getResultType(type_: CXType) -> CXType;
+    pub fn clang_getSkippedRanges(tu: CXTranslationUnit, file: CXFile) -> *mut CXSourceRangeList;
+    pub fn clang_getSpecializedCursorTemplate(cursor: CXCursor) -> CXCursor;
+    pub fn clang_getSpellingLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
+    pub fn clang_getTUResourceUsageName(kind: CXTUResourceUsageKind) -> *const c_char;
+    pub fn clang_getTemplateCursorKind(cursor: CXCursor) -> CXCursorKind;
+    pub fn clang_getTokenExtent(tu: CXTranslationUnit, token: CXToken) -> CXSourceRange;
+    pub fn clang_getTokenKind(token: CXToken) -> CXTokenKind;
+    pub fn clang_getTokenLocation(tu: CXTranslationUnit, token: CXToken) -> CXSourceLocation;
+    pub fn clang_getTokenSpelling(tu: CXTranslationUnit, token: CXToken) -> CXString;
+    pub fn clang_getTranslationUnitCursor(tu: CXTranslationUnit) -> CXCursor;
+    pub fn clang_getTranslationUnitSpelling(tu: CXTranslationUnit) -> CXString;
+    pub fn clang_getTypeDeclaration(type_: CXType) -> CXCursor;
+    pub fn clang_getTypeKindSpelling(type_: CXTypeKind) -> CXString;
+    pub fn clang_getTypeSpelling(type_: CXType) -> CXString;
+    pub fn clang_getTypedefDeclUnderlyingType(cursor: CXCursor) -> CXType;
+    pub fn clang_hashCursor(cursor: CXCursor) -> c_uint;
+    pub fn clang_indexLoc_getCXSourceLocation(location: CXIdxLoc) -> CXSourceLocation;
+    pub fn clang_indexLoc_getFileLocation(location: CXIdxLoc, index_file: *mut CXIdxClientFile, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
+    pub fn clang_indexSourceFile(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, index_flags: CXIndexOptFlags, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, tu: *mut CXTranslationUnit, tu_flags: CXTranslationUnit_Flags) -> CXErrorCode;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_indexSourceFileFullArgv(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, index_flags: CXIndexOptFlags, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, tu: *mut CXTranslationUnit, tu_flags: CXTranslationUnit_Flags) -> CXErrorCode;
+    pub fn clang_indexTranslationUnit(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, flags: CXIndexOptFlags, tu: CXTranslationUnit) -> c_int;
+    pub fn clang_index_getCXXClassDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxCXXClassDeclInfo;
+    pub fn clang_index_getClientContainer(info: *const CXIdxContainerInfo) -> CXIdxClientContainer;
+    pub fn clang_index_getClientEntity(info: *const CXIdxEntityInfo) -> CXIdxClientEntity;
+    pub fn clang_index_getIBOutletCollectionAttrInfo(info: *const CXIdxAttrInfo) -> *const CXIdxIBOutletCollectionAttrInfo;
+    pub fn clang_index_getObjCCategoryDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCCategoryDeclInfo;
+    pub fn clang_index_getObjCContainerDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCContainerDeclInfo;
+    pub fn clang_index_getObjCInterfaceDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCInterfaceDeclInfo;
+    pub fn clang_index_getObjCPropertyDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCPropertyDeclInfo;
+    pub fn clang_index_getObjCProtocolRefListInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCProtocolRefListInfo;
+    pub fn clang_index_isEntityObjCContainerKind(info: CXIdxEntityKind) -> c_int;
+    pub fn clang_index_setClientContainer(info: *const CXIdxContainerInfo, container: CXIdxClientContainer);
+    pub fn clang_index_setClientEntity(info: *const CXIdxEntityInfo, entity: CXIdxClientEntity);
+    pub fn clang_isAttribute(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isConstQualifiedType(type_: CXType) -> c_uint;
+    pub fn clang_isCursorDefinition(cursor: CXCursor) -> c_uint;
+    pub fn clang_isDeclaration(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isExpression(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isFileMultipleIncludeGuarded(tu: CXTranslationUnit, file: CXFile) -> c_uint;
+    pub fn clang_isFunctionTypeVariadic(type_: CXType) -> c_uint;
+    pub fn clang_isInvalid(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isPODType(type_: CXType) -> c_uint;
+    pub fn clang_isPreprocessing(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isReference(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isRestrictQualifiedType(type_: CXType) -> c_uint;
+    pub fn clang_isStatement(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isTranslationUnit(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isUnexposed(kind: CXCursorKind) -> c_uint;
+    pub fn clang_isVirtualBase(cursor: CXCursor) -> c_uint;
+    pub fn clang_isVolatileQualifiedType(type_: CXType) -> c_uint;
+    pub fn clang_loadDiagnostics(file: *const c_char, error: *mut CXLoadDiag_Error, message: *mut CXString) -> CXDiagnosticSet;
+    pub fn clang_parseTranslationUnit(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags) -> CXTranslationUnit;
+    pub fn clang_parseTranslationUnit2(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags, tu: *mut CXTranslationUnit) -> CXErrorCode;
+    #[cfg(feature="gte_clang_3_8")]
+    pub fn clang_parseTranslationUnit2FullArgv(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags, tu: *mut CXTranslationUnit) -> CXErrorCode;
+    pub fn clang_remap_dispose(remapping: CXRemapping);
+    pub fn clang_remap_getFilenames(remapping: CXRemapping, index: c_uint, original: *mut CXString, transformed: *mut CXString);
+    pub fn clang_remap_getNumFiles(remapping: CXRemapping) -> c_uint;
+    pub fn clang_reparseTranslationUnit(tu: CXTranslationUnit, n_unsaved: c_uint, unsaved: *mut CXUnsavedFile, flags: CXReparse_Flags) -> CXErrorCode;
+    pub fn clang_saveTranslationUnit(tu: CXTranslationUnit, file: *const c_char, options: CXSaveTranslationUnit_Flags) -> CXSaveError;
+    pub fn clang_sortCodeCompletionResults(results: *mut CXCompletionResult, n_results: c_uint);
+    pub fn clang_toggleCrashRecovery(recovery: c_uint);
+    pub fn clang_tokenize(tu: CXTranslationUnit, range: CXSourceRange, tokens: *mut *mut CXToken, n_tokens: *mut c_uint);
+    pub fn clang_visitChildren(cursor: CXCursor, visitor: CXCursorVisitor, data: CXClientData) -> c_uint;
+
+    // Documentation
+    pub fn clang_BlockCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString;
+    pub fn clang_BlockCommandComment_getCommandName(comment: CXComment) -> CXString;
+    pub fn clang_BlockCommandComment_getNumArgs(comment: CXComment) -> c_uint;
+    pub fn clang_BlockCommandComment_getParagraph(comment: CXComment) -> CXComment;
+    pub fn clang_Comment_getChild(comment: CXComment, index: c_uint) -> CXComment;
+    pub fn clang_Comment_getKind(comment: CXComment) -> CXCommentKind;
+    pub fn clang_Comment_getNumChildren(comment: CXComment) -> c_uint;
+    pub fn clang_Comment_isWhitespace(comment: CXComment) -> c_uint;
+    pub fn clang_Cursor_getParsedComment(C: CXCursor) -> CXComment;
+    pub fn clang_FullComment_getAsHTML(comment: CXComment) -> CXString;
+    pub fn clang_FullComment_getAsXML(comment: CXComment) -> CXString;
+    pub fn clang_HTMLStartTagComment_isSelfClosing(comment: CXComment) -> c_uint;
+    pub fn clang_HTMLStartTag_getAttrName(comment: CXComment, index: c_uint) -> CXString;
+    pub fn clang_HTMLStartTag_getAttrValue(comment: CXComment, index: c_uint) -> CXString;
+    pub fn clang_HTMLStartTag_getNumAttrs(comment: CXComment) -> c_uint;
+    pub fn clang_HTMLTagComment_getAsString(comment: CXComment) -> CXString;
+    pub fn clang_HTMLTagComment_getTagName(comment: CXComment) -> CXString;
+    pub fn clang_InlineCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString;
+    pub fn clang_InlineCommandComment_getCommandName(comment: CXComment) -> CXString;
+    pub fn clang_InlineCommandComment_getNumArgs(comment: CXComment) -> c_uint;
+    pub fn clang_InlineCommandComment_getRenderKind(comment: CXComment) -> CXCommentInlineCommandRenderKind;
+    pub fn clang_InlineContentComment_hasTrailingNewline(comment: CXComment) -> c_uint;
+    pub fn clang_ParamCommandComment_getDirection(comment: CXComment) -> CXCommentParamPassDirection;
+    pub fn clang_ParamCommandComment_getParamIndex(comment: CXComment) -> c_uint;
+    pub fn clang_ParamCommandComment_getParamName(comment: CXComment) -> CXString;
+    pub fn clang_ParamCommandComment_isDirectionExplicit(comment: CXComment) -> c_uint;
+    pub fn clang_ParamCommandComment_isParamIndexValid(comment: CXComment) -> c_uint;
+    pub fn clang_TParamCommandComment_getDepth(comment: CXComment) -> c_uint;
+    pub fn clang_TParamCommandComment_getIndex(comment: CXComment, depth: c_uint) -> c_uint;
+    pub fn clang_TParamCommandComment_getParamName(comment: CXComment) -> CXString;
+    pub fn clang_TParamCommandComment_isParamPositionValid(comment: CXComment) -> c_uint;
+    pub fn clang_TextComment_getText(comment: CXComment) -> CXString;
+    pub fn clang_VerbatimBlockLineComment_getText(comment: CXComment) -> CXString;
+    pub fn clang_VerbatimLineComment_getText(comment: CXComment) -> CXString;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/src/link.rs
@@ -0,0 +1,185 @@
+// Copyright 2016 Kyle Mayes
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//================================================
+// Macros
+//================================================
+
+// link! _________________________________________
+
+#[cfg(feature="runtime")]
+macro_rules! link {
+    (@LOAD: #[cfg($cfg:meta)] fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*) => (
+        #[cfg($cfg)]
+        pub fn $name(library: &mut super::SharedLibrary) {
+            let symbol = unsafe { library.library.get(stringify!($name).as_bytes()) }.ok();
+            library.functions.$name = symbol.map(|s| *s);
+        }
+
+        #[cfg(not($cfg))]
+        pub fn $name(_: &mut super::SharedLibrary) {}
+    );
+
+    (@LOAD: fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*) => (
+        link!(@LOAD: #[cfg(feature="runtime")] fn $name($($pname: $pty), *) $(-> $ret)*);
+    );
+
+    ($($(#[cfg($cfg:meta)])* pub fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*;)+) => (
+        use std::cell::{RefCell};
+        use std::sync::{Arc};
+
+        /// The set of functions loaded dynamically.
+        #[derive(Debug)]
+        pub struct Functions {
+            $($(#[cfg($cfg)])* pub $name: Option<unsafe extern fn($($pname: $pty), *) $(-> $ret)*>,)+
+        }
+
+        impl Default for Functions {
+            fn default() -> Functions {
+                unsafe { std::mem::zeroed() }
+            }
+        }
+
+        /// A dynamically loaded instance of the `libclang` library.
+        #[derive(Debug)]
+        pub struct SharedLibrary {
+            library: libloading::Library,
+            pub functions: Functions,
+        }
+
+        impl SharedLibrary {
+            //- Constructors -----------------------------
+
+            fn new(library: libloading::Library) -> SharedLibrary {
+                SharedLibrary { library: library, functions: Functions::default() }
+            }
+        }
+
+        thread_local!(static LIBRARY: RefCell<Option<Arc<SharedLibrary>>> = RefCell::new(None));
+
+        /// Returns whether a `libclang` shared library is loaded on this thread.
+        pub fn is_loaded() -> bool {
+            LIBRARY.with(|l| l.borrow().is_some())
+        }
+
+        fn with_library<T, F>(f: F) -> Option<T> where F: FnOnce(&SharedLibrary) -> T {
+            LIBRARY.with(|l| {
+                match l.borrow().as_ref() {
+                    Some(library) => Some(f(&library)),
+                    _ => None,
+                }
+            })
+        }
+
+        $(
+            #[cfg_attr(feature="clippy", allow(too_many_arguments))]
+            $(#[cfg($cfg)])*
+            pub unsafe fn $name($($pname: $pty), *) $(-> $ret)* {
+                let f = with_library(|l| {
+                    match l.functions.$name {
+                        Some(f) => f,
+                        _ => panic!(concat!("function not loaded: ", stringify!($name))),
+                    }
+                }).expect("a `libclang` shared library is not loaded on this thread");
+                f($($pname), *)
+            }
+
+            $(#[cfg($cfg)])*
+            pub mod $name {
+                pub fn is_loaded() -> bool {
+                    super::with_library(|l| l.functions.$name.is_some()).unwrap_or(false)
+                }
+            }
+        )+
+
+        mod load {
+            $(link!(@LOAD: $(#[cfg($cfg)])* fn $name($($pname: $pty), *) $(-> $ret)*);)+
+        }
+
+        /// Loads a `libclang` shared library and returns the library instance.
+        ///
+        /// This function does not attempt to load any functions from the shared library. The caller
+        /// is responsible for loading the functions they require.
+        ///
+        /// # Failures
+        ///
+        /// * a `libclang` shared library could not be found
+        /// * the `libclang` shared library could not be opened
+        pub fn load_manually() -> Result<SharedLibrary, String> {
+            #[path="../build.rs"]
+            mod build;
+
+            let file = try!(build::find_shared_library());
+            let library = libloading::Library::new(&file).map_err(|_| {
+                format!("the `libclang` shared library could not be opened: {}", file.display())
+            });
+            let mut library = SharedLibrary::new(try!(library));
+            $(load::$name(&mut library);)+
+            Ok(library)
+        }
+
+        /// Loads a `libclang` shared library for use in the current thread.
+        ///
+        /// This functions attempts to load all the functions in the shared library. Whether a
+        /// function has been loaded can be tested by calling the `is_loaded` function on the
+        /// module with the same name as the function (e.g., `clang_createIndex::is_loaded()` for
+        /// the `clang_createIndex` function).
+        ///
+        /// # Failures
+        ///
+        /// * a `libclang` shared library could not be found
+        /// * the `libclang` shared library could not be opened
+        #[allow(dead_code)]
+        pub fn load() -> Result<(), String> {
+            let library = Arc::new(try!(load_manually()));
+            LIBRARY.with(|l| *l.borrow_mut() = Some(library));
+            Ok(())
+        }
+
+        /// Unloads the `libclang` shared library in use in the current thread.
+        ///
+        /// # Failures
+        ///
+        /// * a `libclang` shared library is not in use in the current thread
+        pub fn unload() -> Result<(), String> {
+            let library = set_library(None);
+            if library.is_some() {
+                Ok(())
+            } else {
+                Err("a `libclang` shared library is not in use in the current thread".into())
+            }
+        }
+
+        /// Returns the library instance stored in TLS.
+        ///
+        /// This functions allows for sharing library instances between threads.
+        pub fn get_library() -> Option<Arc<SharedLibrary>> {
+            LIBRARY.with(|l| l.borrow_mut().clone())
+        }
+
+        /// Sets the library instance stored in TLS and returns the previous library.
+        ///
+        /// This functions allows for sharing library instances between threads.
+        pub fn set_library(library: Option<Arc<SharedLibrary>>) -> Option<Arc<SharedLibrary>> {
+            LIBRARY.with(|l| mem::replace(&mut *l.borrow_mut(), library))
+        }
+    )
+}
+
+#[cfg(not(feature="runtime"))]
+macro_rules! link {
+    ($($(#[cfg($cfg:meta)])* pub fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*;)+) => (
+        extern { $($(#[cfg($cfg)])* pub fn $name($($pname: $pty), *) $(-> $ret)*;)+ }
+    )
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/src/support.rs
@@ -0,0 +1,190 @@
+// Copyright 2016 Kyle Mayes
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Provides helper functionality.
+
+use std::{io, env};
+use std::process::{Command};
+use std::path::{Path, PathBuf};
+
+use glob;
+
+use libc::{c_int};
+
+use super::{CXVersion};
+
+//================================================
+// Macros
+//================================================
+
+// try_opt! ______________________________________
+
+macro_rules! try_opt {
+    ($option:expr) => ({
+        match $option {
+            Some(some) => some,
+            None => return None,
+        }
+    });
+}
+
+//================================================
+// Structs
+//================================================
+
+/// A `clang` executable.
+#[derive(Clone, Debug)]
+pub struct Clang {
+    /// The path to this `clang` executable.
+    pub path: PathBuf,
+    /// The version of this `clang` executable if it could be parsed.
+    pub version: Option<CXVersion>,
+    /// The directories searched by this `clang` executable for C headers if they could be parsed.
+    pub c_search_paths: Option<Vec<PathBuf>>,
+    /// The directories searched by this `clang` executable for C++ headers if they could be parsed.
+    pub cpp_search_paths: Option<Vec<PathBuf>>,
+}
+
+impl Clang {
+    //- Constructors -----------------------------
+
+    fn new(path: PathBuf, args: &[String]) -> Clang {
+        let version = parse_version(&path);
+        let c_search_paths = parse_search_paths(&path, "c", args);
+        let cpp_search_paths = parse_search_paths(&path, "c++", args);
+        Clang {
+            path: path,
+            version: version,
+            c_search_paths: c_search_paths,
+            cpp_search_paths: cpp_search_paths,
+        }
+    }
+
+    /// Returns a `clang` executable if one can be found.
+    ///
+    /// If the `CLANG_PATH` environment variable is set, that is the instance of `clang` used.
+    /// Otherwise, a series of directories are searched. First, If a path is supplied, that is the
+    /// first directory searched. Then, the directory returned by `llvm-config --bindir` is
+    /// searched. On OS X systems, `xcodebuild -find clang` will next be queried. Last, the
+    /// directories in the system's `PATH` are searched.
+    pub fn find(path: Option<&Path>, args: &[String]) -> Option<Clang> {
+        if let Ok(path) = env::var("CLANG_PATH") {
+            return Some(Clang::new(path.into(), args));
+        }
+
+        let mut paths = vec![];
+        if let Some(path) = path {
+            paths.push(path.into());
+        }
+        if let Ok(path) = run_llvm_config(&["--bindir"]) {
+            paths.push(path.into());
+        }
+        if cfg!(target_os="macos") {
+            if let Ok((path, _)) = run("xcodebuild", &["-find", "clang"]) {
+                paths.push(path.into());
+            }
+        }
+        paths.extend(env::split_paths(&env::var("PATH").unwrap()));
+
+        let default = format!("clang{}", env::consts::EXE_SUFFIX);
+        let versioned = format!("clang-[0-9]*{}", env::consts::EXE_SUFFIX);
+        let patterns = &[&default[..], &versioned[..]];
+        for path in paths {
+            if let Some(path) = find(&path, patterns) {
+                return Some(Clang::new(path, args));
+            }
+        }
+        None
+    }
+}
+
+//================================================
+// Functions
+//================================================
+
+/// Returns the first match to the supplied glob patterns in the supplied directory if there are any
+/// matches.
+fn find(directory: &Path, patterns: &[&str]) -> Option<PathBuf> {
+    for pattern in patterns {
+        let pattern = directory.join(pattern).to_string_lossy().into_owned();
+        if let Some(path) = try_opt!(glob::glob(&pattern).ok()).filter_map(|p| p.ok()).next() {
+            if path.is_file() && is_executable(&path).unwrap_or(false) {
+                return Some(path);
+            }
+        }
+    }
+    None
+}
+
+#[cfg(unix)]
+fn is_executable(path: &Path) -> io::Result<bool> {
+    use libc;
+    use std::ffi::CString;
+    use std::os::unix::ffi::OsStrExt;
+
+    let path = CString::new(path.as_os_str().as_bytes())?;
+    unsafe { Ok(libc::access(path.as_ptr(), libc::X_OK) == 0) }
+}
+
+#[cfg(not(unix))]
+fn is_executable(path: &Path) -> io::Result<bool> {
+    Ok(true)
+}
+
+/// Attempts to run an executable, returning the `stdout` and `stderr` output if successful.
+fn run(executable: &str, arguments: &[&str]) -> Result<(String, String), String> {
+    Command::new(executable).args(arguments).output().map(|o| {
+        let stdout = String::from_utf8_lossy(&o.stdout).into_owned();
+        let stderr = String::from_utf8_lossy(&o.stderr).into_owned();
+        (stdout, stderr)
+    }).map_err(|_| format!("could not run executable: `{}`", executable))
+}
+
+/// Runs `clang`, returning the `stdout` and `stderr` output.
+fn run_clang(path: &Path, arguments: &[&str]) -> (String, String) {
+    run(&path.to_string_lossy().into_owned(), arguments).unwrap()
+}
+
+/// Runs `llvm-config`, returning the `stdout` output if successful.
+fn run_llvm_config(arguments: &[&str]) -> Result<String, String> {
+    let config = env::var("LLVM_CONFIG_PATH").unwrap_or_else(|_| "llvm-config".to_string());
+    run(&config, arguments).map(|(o, _)| o)
+}
+
+/// Parses a version number if possible, ignoring trailing non-digit characters.
+fn parse_version_number(number: &str) -> Option<c_int> {
+    number.chars().take_while(|c| c.is_digit(10)).collect::<String>().parse().ok()
+}
+
+/// Parses the version from the output of a `clang` executable if possible.
+fn parse_version(path: &Path) -> Option<CXVersion> {
+    let output = run_clang(path, &["--version"]).0;
+    let start = try_opt!(output.find("version ")) + 8;
+    let mut numbers = try_opt!(output[start..].split_whitespace().nth(0)).split('.');
+    let major = try_opt!(numbers.next().and_then(parse_version_number));
+    let minor = try_opt!(numbers.next().and_then(parse_version_number));
+    let subminor = numbers.next().and_then(parse_version_number).unwrap_or(0);
+    Some(CXVersion { Major: major, Minor: minor, Subminor: subminor })
+}
+
+/// Parses the search paths from the output of a `clang` executable if possible.
+fn parse_search_paths(path: &Path, language: &str, args: &[String]) -> Option<Vec<PathBuf>> {
+    let mut clang_args = vec!["-E", "-x", language, "-", "-v"];
+    clang_args.extend(args.iter().map(|s| &**s));
+    let output = run_clang(path, &clang_args).1;
+    let start = try_opt!(output.find("#include <...> search starts here:")) + 34;
+    let end = try_opt!(output.find("End of search list."));
+    let paths = output[start..end].replace("(framework directory)", "");
+    Some(paths.lines().filter(|l| !l.is_empty()).map(|l| Path::new(l.trim()).into()).collect())
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/tests/header.h
@@ -0,0 +1,6 @@
+#ifndef HEADER_H_
+#define HEADER_H_
+
+int add(int a, int b);
+
+#endif
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clang-sys-0.19.0/tests/lib.rs
@@ -0,0 +1,46 @@
+extern crate clang_sys;
+extern crate libc;
+
+use std::ptr;
+
+use clang_sys::*;
+
+use libc::{c_char};
+
+fn parse() {
+    unsafe {
+        let index = clang_createIndex(0, 0);
+        assert!(!index.is_null());
+
+        let tu = clang_parseTranslationUnit(
+            index,
+            "tests/header.h\0".as_ptr() as *const c_char,
+            ptr::null_mut(),
+            0,
+            ptr::null_mut(),
+            0,
+            CXTranslationUnit_Flags::empty(),
+        );
+        assert!(!tu.is_null());
+    }
+}
+
+#[cfg(feature="runtime")]
+#[test]
+fn test() {
+    load().unwrap();
+    parse();
+    unload().unwrap();
+}
+
+#[cfg(not(feature="runtime"))]
+#[test]
+fn test() {
+    parse();
+}
+
+#[test]
+fn test_support() {
+    let clang = support::Clang::find(None, &[]).unwrap();
+    println!("{:?}", clang);
+}
--- a/third_party/rust/clang-sys/.cargo-checksum.json
+++ b/third_party/rust/clang-sys/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"79d6a139814ae0f06ce0ca85fe22a27316a27d444320b904c471c7f612129889","CHANGELOG.md":"bd7194bb4c1572c3c34764853a871649bb4f8a20bd7fe6ef96aa8c49d3eb79a9","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"5f1795410761466bc3fbcec96a4f5d560b6ccf681bfa86b337fcf3b83ee074cb","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"73c5156eeff880c0c0ea80a2eb2926797fd06376118e23f842b4164ad677d4f1","appveyor.yml":"fe7033ab25bb78005136748676f59bfdd8f65b4c5c2910af911cbb9c496bdaef","build.rs":"2b934b1cd30083531d4b751f8fe22f997e07ffc35631f15a734574d1d2fa0900","ci/before_install.sh":"402f5704cd0163254b056a515a6cdfa16482eb2e28c31eb63a5c226abd26a8b7","ci/install.bat":"d694550679e14b384f8adf8384d475866e5880002cf82d450926f4607dc9077b","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"7576ac0decd8827f2454af80631f8c7a852c0b56c28c0b08e03274a7c6e26ab0","src/link.rs":"b9f76e26fa9b1d690f6abf17e9f898d6545be149e2afe64c7411cd53e3168fcf","src/support.rs":"174534f4963a841de7c4fe14d9db6930355d99e5497ac38f42c9006440be02ef","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"cc0544b0e580d79ae7a7ce0f390f979b3fabe85370b29318d5fc51c9de92599d"},"package":"611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a"}
\ No newline at end of file
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"136bc7c0b31a2317ca827c49b25aac46ae685e0c401a783a9b0505bb1405b30b","CHANGELOG.md":"12141ad7256835749c04c43e36eb128484d904a380f11ad34f90e738514a01a7","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"eac0e457be834ae463858dc840d93929a33c4ba91739b1f58521948c725266f1","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"17568cd3ba6ea85a1a5a661d0755eb7bc1640a569fdb4e4add9ebc764eb62bfb","appveyor.yml":"c9ab8ab1ab028b27d2be176e994a0d6a255cf8bcc36e15868472b6b8abf33fac","build.rs":"b99acc3fa4f1ee801805bd124544e43367ee2b51777aea4d64462c2c4df6d279","ci/before_install.sh":"711c9d0539fa0372980c3a288d9482a0e46d3ba0fb8f7c7c110d6488a8ec4de5","ci/install.bat":"d694550679e14b384f8adf8384d475866e5880002cf82d450926f4607dc9077b","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"7220620110eae7ca261d040bf62ee499ca0faf4c2b754f73d86aa5f5885fc12b","src/link.rs":"eb73ee98ca8e2ca3a0de05ffd01d905046c8d0aef99f13397b9e3996037e8993","src/support.rs":"9929cdf5ad0896248938282d0e621be34855bca9a1eb6b7a02a174ace58a9d86","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"e5e8a60bcaec3b5d043fde4a993d397adb56454d0b2a6adaa15df0535246f909"},"package":"5955eab05fa8e6ff2b353753dc73a0608daa36e472a21c69f2eb51f43f593544"}
\ No newline at end of file
--- a/third_party/rust/clang-sys/.travis.yml
+++ b/third_party/rust/clang-sys/.travis.yml
@@ -10,19 +10,24 @@ addons:
 os:
   - linux
   - osx
 
 rust: stable
 
 env:
   - LLVM_VERSION=3.5 CLANG_VERSION=clang_3_5
-  - LLVM_VERSION=4.0 CLANG_VERSION=clang_4_0
+  - LLVM_VERSION=5.0 CLANG_VERSION=clang_5_0
 
 # FIXME: I have no idea why this build is failing.
 matrix:
   allow_failures:
     - os: osx
-      env: LLVM_VERSION=4.0 CLANG_VERSION=clang_4_0
+      env: LLVM_VERSION=5.0 CLANG_VERSION=clang_5_0
+
+cache:
+  directories:
+    - $HOME/.cargo
+    - $HOME/.llvm
 
 before_install: . ./ci/before_install.sh
 
 script: . ./ci/script.sh
--- a/third_party/rust/clang-sys/CHANGELOG.md
+++ b/third_party/rust/clang-sys/CHANGELOG.md
@@ -1,8 +1,31 @@
+## [0.21.0] - 2017-10-11
+
+### Changed
+* Replaced `bitflags` usage with constants which avoids crashes on 32-bit Linux platforms
+
+## [0.20.1] - 2017-09-16
+
+### Fixed
+- Fixed static linking
+
+## [0.20.0] - 2017-09-14
+
+### Added
+- Added support for `clang` 5.0.x
+- Added `clang` as a link target of this package
+- Added dummy implementations of `is_loaded` for builds with the `static` Cargo feature enabled
+
+## [0.19.0] - 2017-07-02
+
+### Changed
+- Bumped `bitflags` version to `0.9.1`
+- Added `args` parameter to `Clang::new` function which passes arguments to the Clang executable
+
 ## [0.18.0] - 2017-05-16
 
 ### Changed
 - Improved finding of versioned libraries (e.g., `libclang.so.3.9`)
 
 ## [0.17.0] - 2017-05-08
 
 ### Changed
--- a/third_party/rust/clang-sys/Cargo.toml
+++ b/third_party/rust/clang-sys/Cargo.toml
@@ -1,49 +1,59 @@
-[package]
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
 
+[package]
 name = "clang-sys"
+version = "0.21.0"
 authors = ["Kyle Mayes <kyle@mayeses.com>"]
-
-version = "0.19.0"
-
+build = "build.rs"
+links = "clang"
+description = "Rust bindings for libclang."
+documentation = "https://kylemayes.github.io/clang-sys/3_5/clang_sys"
 readme = "README.md"
 license = "Apache-2.0"
+repository = "https://github.com/KyleMayes/clang-sys"
+[dependencies.libloading]
+version = "0.4.0"
+optional = true
 
-description = "Rust bindings for libclang."
+[dependencies.clippy]
+version = "0.0.*"
+optional = true
 
-documentation = "https://kylemayes.github.io/clang-sys/3_5/clang_sys"
-repository = "https://github.com/KyleMayes/clang-sys"
+[dependencies.glob]
+version = "0.2.11"
 
-build = "build.rs"
+[dependencies.libc]
+version = "0.2.14"
+[build-dependencies.glob]
+version = "0.2.11"
+
+[build-dependencies.clippy]
+version = "0.0.*"
+optional = true
 
 [features]
-
-clang_3_5 = []
+runtime = ["libloading"]
 clang_3_6 = ["gte_clang_3_6"]
-clang_3_7 = ["gte_clang_3_6", "gte_clang_3_7"]
+gte_clang_5_0 = []
+gte_clang_4_0 = []
 clang_3_8 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8"]
 clang_3_9 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9"]
+gte_clang_3_6 = []
 clang_4_0 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9", "gte_clang_4_0"]
-
-gte_clang_3_6 = []
+clang_3_7 = ["gte_clang_3_6", "gte_clang_3_7"]
+gte_clang_3_9 = []
 gte_clang_3_7 = []
-gte_clang_3_8 = []
-gte_clang_3_9 = []
-gte_clang_4_0 = []
-
-runtime = ["libloading"]
 static = []
-
-[dependencies]
-
-bitflags = "0.9.1"
-glob = "0.2.11"
-libc = "0.2.14"
-libloading = { version = "0.4.0", optional = true }
-
-clippy = { version = "0.0.*", optional = true }
-
-[build-dependencies]
-
-glob = "0.2.11"
-
-clippy = { version = "0.0.*", optional = true }
+gte_clang_3_8 = []
+clang_3_5 = []
+clang_5_0 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9", "gte_clang_4_0", "gte_clang_5_0"]
--- a/third_party/rust/clang-sys/README.md
+++ b/third_party/rust/clang-sys/README.md
@@ -26,16 +26,18 @@ To target a version of `libclang`, enabl
 * `clang_3_7` - requires `libclang` 3.7 or later
   ([Documentation](https://kylemayes.github.io/clang-sys/3_7/clang_sys))
 * `clang_3_8` - requires `libclang` 3.8 or later
   ([Documentation](https://kylemayes.github.io/clang-sys/3_8/clang_sys))
 * `clang_3_9` - requires `libclang` 3.9 or later
   ([Documentation](https://kylemayes.github.io/clang-sys/3_9/clang_sys))
 * `clang_4_0` - requires `libclang` 4.0 or later
   ([Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys))
+* `clang_5_0` - requires `libclang` 5.0 or later
+  ([Documentation](https://kylemayes.github.io/clang-sys/5_0/clang_sys))
 
 If you do not enable one of these features, the API provided by `libclang` 3.5 will be available by
 default.
 
 ## Dependencies
 
 By default, this crate will attempt to link to `libclang` dynamically. In this case, this crate
 depends on the `libclang` shared library (`libclang.so` on Linux, `libclang.dylib` on OS X,
--- a/third_party/rust/clang-sys/appveyor.yml
+++ b/third_party/rust/clang-sys/appveyor.yml
@@ -1,12 +1,12 @@
 environment:
   matrix:
-    - LLVM_VERSION: 4.0.0
-      CLANG_VERSION: clang_4_0
+    - LLVM_VERSION: 5.0.0
+      CLANG_VERSION: clang_5_0
 
 install:
   - .\ci\install.bat
 
 build: false
 
 test_script:
   - .\ci\test_script.bat
--- a/third_party/rust/clang-sys/build.rs
+++ b/third_party/rust/clang-sys/build.rs
@@ -248,17 +248,24 @@ pub fn find_shared_library() -> Result<P
         // unofficial builds such as MinGW use `clang.dll`.
         files.push("libclang.dll".into());
     }
     find(Library::Dynamic, &files, "LIBCLANG_PATH")
 }
 
 /// Returns the name of an LLVM or Clang library from a path to such a library.
 fn get_library_name(path: &Path) -> Option<String> {
-    path.file_stem().map(|l| l.to_string_lossy()[3..].into())
+    path.file_stem().map(|p| {
+        let string = p.to_string_lossy();
+        if string.starts_with("lib") {
+            string[3..].to_owned()
+        } else {
+            string.to_string()
+        }
+    })
 }
 
 /// Returns the LLVM libraries required to link to `libclang` statically.
 fn get_llvm_libraries() -> Vec<String> {
     run_llvm_config(&["--libs"]).unwrap().split_whitespace().filter_map(|p| {
         // Depending on the version of `llvm-config` in use, listed libraries may be in one of two
         // forms, a full path to the library or simply prefixed with `-l`.
         if p.starts_with("-l") {
@@ -294,41 +301,44 @@ fn get_clang_libraries<P: AsRef<Path>>(d
     } else {
         CLANG_LIBRARIES.iter().map(|l| l.to_string()).collect()
     }
 }
 
 /// Find and link to `libclang` statically.
 #[cfg_attr(feature="runtime", allow(dead_code))]
 fn link_static() {
-    let file = find(Library::Static, &["libclang.a".into()], "LIBCLANG_STATIC_PATH").unwrap();
+    let name = if cfg!(target_os="windows") { "libclang.lib" } else { "libclang.a" };
+    let file = find(Library::Static, &[name.into()], "LIBCLANG_STATIC_PATH").unwrap();
     let directory = file.parent().unwrap();
-    print!("cargo:rustc-flags=");
 
     // Specify required Clang static libraries.
-    print!("-L {} ", directory.display());
+    println!("cargo:rustc-link-search=native={}", directory.display());
     for library in get_clang_libraries(directory) {
-        print!("-l static={} ", library);
+        println!("cargo:rustc-link-lib=static={}", library);
     }
 
+    // Determine the shared mode used by LLVM.
+    let mode = run_llvm_config(&["--shared-mode"]).map(|m| m.trim().to_owned());
+    let prefix = if mode.ok().map_or(false, |m| m == "static") { "static=" } else { "" };
+
     // Specify required LLVM static libraries.
-    print!("-L {} ", run_llvm_config(&["--libdir"]).unwrap().trim_right());
+    println!("cargo:rustc-link-search=native={}", run_llvm_config(&["--libdir"]).unwrap().trim_right());
     for library in get_llvm_libraries() {
-        print!("-l static={} ", library);
+        println!("cargo:rustc-link-lib={}{}", prefix, library);
     }
 
     // Specify required system libraries.
+    // MSVC doesn't need this, as it tracks dependencies inside `.lib` files.
     if cfg!(target_os="freebsd") {
-        println!("-l ffi -l ncursesw -l c++ -l z");
+        println!("cargo:rustc-flags=-l ffi -l ncursesw -l c++ -l z");
     } else if cfg!(target_os="linux") {
-        println!("-l ffi -l ncursesw -l stdc++ -l z");
+        println!("cargo:rustc-flags=-l ffi -l ncursesw -l stdc++ -l z");
     } else if cfg!(target_os="macos") {
-        println!("-l ffi -l ncurses -l c++ -l z");
-    } else {
-        panic!("unsupported operating system for static linking");
+        println!("cargo:rustc-flags=-l ffi -l ncurses -l c++ -l z");
     }
 }
 
 /// Find and link to `libclang` dynamically.
 #[cfg_attr(feature="runtime", allow(dead_code))]
 fn link_dynamic() {
     let file = find_shared_library().unwrap();
     let directory = file.parent().unwrap();
@@ -371,9 +381,14 @@ fn main() {
         if cfg!(feature="static") {
             panic!("`runtime` and `static` features can't be combined");
         }
     } else if cfg!(feature="static") {
         link_static();
     } else {
         link_dynamic();
     }
+
+    if let Ok(output) = run_llvm_config(&["--includedir"]) {
+        let directory = Path::new(output.trim_right());
+        println!("cargo:include={}", directory.display());
+    }
 }
old mode 100755
new mode 100644
--- a/third_party/rust/clang-sys/ci/before_install.sh
+++ b/third_party/rust/clang-sys/ci/before_install.sh
@@ -1,36 +1,61 @@
 set -e
+pushd ~
+
+# Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307)
+if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
+    rvm get head || true
+fi
+
+function llvm_linux_target_triple() {
+    if [ "$1" == "5.0" ]; then
+        echo "linux-x86_64-ubuntu14.04"
+    else
+        echo "x86_64-linux-gnu-ubuntu-14.04"
+    fi
+}
 
 function llvm_version_triple() {
     if [ "$1" == "3.5" ]; then
         echo "3.5.2"
     elif [ "$1" == "3.6" ]; then
         echo "3.6.2"
     elif [ "$1" == "3.7" ]; then
         echo "3.7.1"
     elif [ "$1" == "3.8" ]; then
         echo "3.8.1"
     elif [ "$1" == "3.9" ]; then
         echo "3.9.0"
     elif [ "$1" == "4.0" ]; then
-        echo "4.0.0"
+        echo "4.0.1"
+    elif [ "$1" == "5.0" ]; then
+        echo "5.0.0"
     fi
 }
 
 function llvm_download() {
     export LLVM_VERSION_TRIPLE=`llvm_version_triple ${LLVM_VERSION}`
-    export LLVM=clang+llvm-${LLVM_VERSION_TRIPLE}-x86_64-$1
+    export LLVM=clang+llvm-${LLVM_VERSION_TRIPLE}-$1
+    export LLVM_DIRECTORY="$HOME/.llvm/${LLVM}"
 
-    wget http://llvm.org/releases/${LLVM_VERSION_TRIPLE}/${LLVM}.tar.xz
-    mkdir llvm
-    tar xf ${LLVM}.tar.xz -C llvm --strip-components=1
+    if [ -d "${LLVM_DIRECTORY}" ]; then
+        echo "Using cached LLVM download for ${LLVM}..."
+    else
+        wget http://releases.llvm.org/${LLVM_VERSION_TRIPLE}/${LLVM}.tar.xz
+        mkdir -p "${LLVM_DIRECTORY}"
+        tar xf ${LLVM}.tar.xz -C "${LLVM_DIRECTORY}" --strip-components=1
+    fi
 
-    export LLVM_CONFIG_PATH=`pwd`/llvm/bin/llvm-config
+    export LLVM_CONFIG_PATH="${LLVM_DIRECTORY}/bin/llvm-config"
 }
 
 if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
-    llvm_download linux-gnu-ubuntu-14.04
-    export LD_LIBRARY_PATH=`pwd`/llvm/lib:$LD_LIBRARY_PATH
+    llvm_download `llvm_linux_target_triple ${LLVM_VERSION}`
+    export LD_LIBRARY_PATH="${LLVM_DIRECTORY}/lib":$LD_LIBRARY_PATH
 else
-    llvm_download apple-darwin
-    export DYLD_LIBRARY_PATH=`pwd`/llvm/lib:$DYLD_LIBRARY_PATH
+    llvm_download x86_64-apple-darwin
+    cp "${LLVM_DIRECTORY}/lib/libclang.dylib" /usr/local/lib/libclang.dylib
+    export DYLD_LIBRARY_PATH="${LLVM_DIRECTORY}/lib":$DYLD_LIBRARY_PATH
 fi
+
+popd
+set +e
old mode 100755
new mode 100644
--- a/third_party/rust/clang-sys/src/lib.rs
+++ b/third_party/rust/clang-sys/src/lib.rs
@@ -17,26 +17,24 @@
 //! ## Supported Versions
 //!
 //! * 3.5 - [Documentation](https://kylemayes.github.io/clang-sys/3_5/clang_sys)
 //! * 3.6 - [Documentation](https://kylemayes.github.io/clang-sys/3_6/clang_sys)
 //! * 3.7 - [Documentation](https://kylemayes.github.io/clang-sys/3_7/clang_sys)
 //! * 3.8 - [Documentation](https://kylemayes.github.io/clang-sys/3_8/clang_sys)
 //! * 3.9 - [Documentation](https://kylemayes.github.io/clang-sys/3_9/clang_sys)
 //! * 4.0 - [Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys)
+//! * 5.0 - [Documentation](https://kylemayes.github.io/clang-sys/5_0/clang_sys)
 
 #![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
 
 #![cfg_attr(feature="clippy", feature(plugin))]
 #![cfg_attr(feature="clippy", plugin(clippy))]
 #![cfg_attr(feature="clippy", warn(clippy))]
 
-#[macro_use]
-extern crate bitflags;
-
 extern crate glob;
 extern crate libc;
 #[cfg(feature="runtime")]
 extern crate libloading;
 
 pub mod support;
 
 #[macro_use]
@@ -62,16 +60,23 @@ pub type CXInclusionVisitor = extern fn(
 macro_rules! cenum {
     ($(#[$meta:meta])* enum $name:ident {
         $($(#[$vmeta:meta])* const $variant:ident = $value:expr), +,
     }) => (
         pub type $name = c_int;
 
         $($(#[$vmeta])* pub const $variant: $name = $value;)+
     );
+    ($(#[$meta:meta])* enum $name:ident {
+        $($(#[$vmeta:meta])* const $variant:ident = $value:expr); +;
+    }) => (
+        pub type $name = c_int;
+
+        $($(#[$vmeta])* pub const $variant: $name = $value;)+
+    );
 }
 
 // default! ______________________________________
 
 /// Implements a zeroing implementation of `Default` for the supplied type.
 macro_rules! default {
     (#[$meta:meta] $ty:ty) => {
         #[$meta]
@@ -112,16 +117,17 @@ cenum! {
         const CXCallingConv_X86FastCall = 3,
         const CXCallingConv_X86ThisCall = 4,
         const CXCallingConv_X86Pascal = 5,
         const CXCallingConv_AAPCS = 6,
         const CXCallingConv_AAPCS_VFP = 7,
         /// Only produced by `libclang` 4.0 and later.
         const CXCallingConv_X86RegCall = 8,
         const CXCallingConv_IntelOclBicc = 9,
+        const CXCallingConv_Win64 = 10,
         const CXCallingConv_X86_64Win64 = 10,
         const CXCallingConv_X86_64SysV = 11,
         /// Only produced by `libclang` 3.6 and later.
         const CXCallingConv_X86VectorCall = 12,
         /// Only produced by `libclang` 3.9 and later.
         const CXCallingConv_Swift = 13,
         /// Only produced by `libclang` 3.9 and later.
         const CXCallingConv_PreserveMost = 14,
@@ -466,16 +472,31 @@ cenum! {
         /// Only produced by `libclang` 4.0 and later.
         const CXCursor_FriendDecl = 603,
         /// Only produced by `libclang` 3.7 and later.
         const CXCursor_OverloadCandidate = 700,
     }
 }
 
 cenum! {
+    #[cfg(feature="gte_clang_5_0")]
+    enum CXCursor_ExceptionSpecificationKind {
+        const CXCursor_ExceptionSpecificationKind_None = 0,
+        const CXCursor_ExceptionSpecificationKind_DynamicNone = 1,
+        const CXCursor_ExceptionSpecificationKind_Dynamic = 2,
+        const CXCursor_ExceptionSpecificationKind_MSAny = 3,
+        const CXCursor_ExceptionSpecificationKind_BasicNoexcept = 4,
+        const CXCursor_ExceptionSpecificationKind_ComputedNoexcept = 5,
+        const CXCursor_ExceptionSpecificationKind_Unevaluated = 6,
+        const CXCursor_ExceptionSpecificationKind_Uninstantiated = 7,
+        const CXCursor_ExceptionSpecificationKind_Unparsed = 8,
+    }
+}
+
+cenum! {
     enum CXDiagnosticSeverity {
         const CXDiagnostic_Ignored = 0,
         const CXDiagnostic_Note = 1,
         const CXDiagnostic_Warning = 2,
         const CXDiagnostic_Error = 3,
         const CXDiagnostic_Fatal = 4,
     }
 }
@@ -553,16 +574,18 @@ cenum! {
 }
 
 cenum! {
     enum CXIdxEntityLanguage {
         const CXIdxEntityLang_None = 0,
         const CXIdxEntityLang_C = 1,
         const CXIdxEntityLang_ObjC = 2,
         const CXIdxEntityLang_CXX = 3,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXIdxEntityLang_Swift = 4,
     }
 }
 
 cenum! {
     enum CXIdxEntityRefKind {
         const CXIdxEntityRef_Direct = 1,
         const CXIdxEntityRef_Implicit = 2,
     }
@@ -703,16 +726,18 @@ cenum! {
         const CXType_NullPtr = 24,
         const CXType_Overload = 25,
         const CXType_Dependent = 26,
         const CXType_ObjCId = 27,
         const CXType_ObjCClass = 28,
         const CXType_ObjCSel = 29,
         /// Only produced by `libclang` 3.9 and later.
         const CXType_Float128 = 30,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_Half = 31,
         const CXType_Complex = 100,
         const CXType_Pointer = 101,
         const CXType_BlockPointer = 102,
         const CXType_LValueReference = 103,
         const CXType_RValueReference = 104,
         const CXType_Record = 105,
         const CXType_Enum = 106,
         const CXType_Typedef = 107,
@@ -725,16 +750,98 @@ cenum! {
         const CXType_IncompleteArray = 114,
         const CXType_VariableArray = 115,
         const CXType_DependentSizedArray = 116,
         const CXType_MemberPointer = 117,
         /// Only produced by `libclang` 3.8 and later.
         const CXType_Auto = 118,
         /// Only produced by `libclang` 3.9 and later.
         const CXType_Elaborated = 119,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_Pipe = 120,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dRO = 121,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dArrayRO = 122,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dBufferRO = 123,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dRO = 124,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayRO = 125,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dDepthRO = 126,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayDepthRO = 127,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dMSAARO = 128,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayMSAARO = 129,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dMSAADepthRO = 130,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayMSAADepthRO = 131,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage3dRO = 132,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dWO = 133,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dArrayWO = 134,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dBufferWO = 135,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dWO = 136,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayWO = 137,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dDepthWO = 138,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayDepthWO = 139,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dMSAAWO = 140,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayMSAAWO = 141,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dMSAADepthWO = 142,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayMSAADepthWO = 143,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage3dWO = 144,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dRW = 145,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dArrayRW = 146,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage1dBufferRW = 147,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dRW = 148,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayRW = 149,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dDepthRW = 150,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayDepthRW = 151,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dMSAARW = 152,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayMSAARW = 153,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dMSAADepthRW = 154,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage2dArrayMSAADepthRW = 155,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLImage3dRW = 156,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLSampler = 157,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLEvent = 158,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLQueue = 159,
+        /// Only produced by `libclang` 5.0 and later.
+        const CXType_OCLReserveID = 160,
     }
 }
 
 cenum! {
     enum CXTypeLayoutError {
         const CXTypeLayoutError_Invalid = -1,
         const CXTypeLayoutError_Incomplete = -2,
         const CXTypeLayoutError_Dependent = -3,
@@ -782,28 +889,26 @@ cenum! {
         const CX_SC_Register = 7,
     }
 }
 
 //================================================
 // Flags
 //================================================
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXCodeComplete_Flags: c_uint {
+cenum! {
+    enum CXCodeComplete_Flags {
         const CXCodeComplete_IncludeMacros = 1;
         const CXCodeComplete_IncludeCodePatterns = 2;
         const CXCodeComplete_IncludeBriefComments = 4;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXCompletionContext: c_uint {
+cenum! {
+    enum CXCompletionContext {
         const CXCompletionContext_Unexposed = 0;
         const CXCompletionContext_AnyType = 1;
         const CXCompletionContext_AnyValue = 2;
         const CXCompletionContext_ObjCObjectValue = 4;
         const CXCompletionContext_ObjCSelectorValue = 8;
         const CXCompletionContext_CXXClassTypeValue = 16;
         const CXCompletionContext_DotMemberAccess = 32;
         const CXCompletionContext_ArrowMemberAccess = 64;
@@ -821,82 +926,75 @@ bitflags! {
         const CXCompletionContext_ObjCClassMessage = 262144;
         const CXCompletionContext_ObjCSelectorName = 524288;
         const CXCompletionContext_MacroName = 1048576;
         const CXCompletionContext_NaturalLanguage = 2097152;
         const CXCompletionContext_Unknown = 4194303;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXDiagnosticDisplayOptions: c_uint {
+cenum! {
+    enum CXDiagnosticDisplayOptions {
         const CXDiagnostic_DisplaySourceLocation = 1;
         const CXDiagnostic_DisplayColumn = 2;
         const CXDiagnostic_DisplaySourceRanges = 4;
         const CXDiagnostic_DisplayOption = 8;
         const CXDiagnostic_DisplayCategoryId = 16;
         const CXDiagnostic_DisplayCategoryName = 32;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXGlobalOptFlags: c_uint {
+cenum! {
+    enum CXGlobalOptFlags {
         const CXGlobalOpt_None = 0;
         const CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 1;
         const CXGlobalOpt_ThreadBackgroundPriorityForEditing = 2;
         const CXGlobalOpt_ThreadBackgroundPriorityForAll = 3;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXIdxDeclInfoFlags: c_uint {
+cenum! {
+    enum CXIdxDeclInfoFlags {
         const CXIdxDeclFlag_Skipped = 1;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXIndexOptFlags: c_uint {
+cenum! {
+    enum CXIndexOptFlags {
         const CXIndexOptNone = 0;
         const CXIndexOptSuppressRedundantRefs = 1;
         const CXIndexOptIndexFunctionLocalSymbols = 2;
         const CXIndexOptIndexImplicitTemplateInstantiations = 4;
         const CXIndexOptSuppressWarnings = 8;
         const CXIndexOptSkipParsedBodiesInSession = 16;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXNameRefFlags: c_uint {
+cenum! {
+    enum CXNameRefFlags {
         const CXNameRange_WantQualifier = 1;
         const CXNameRange_WantTemplateArgs = 2;
         const CXNameRange_WantSinglePiece = 4;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXObjCDeclQualifierKind: c_uint {
+cenum! {
+    enum CXObjCDeclQualifierKind {
         const CXObjCDeclQualifier_None = 0;
         const CXObjCDeclQualifier_In = 1;
         const CXObjCDeclQualifier_Inout = 2;
         const CXObjCDeclQualifier_Out = 4;
         const CXObjCDeclQualifier_Bycopy = 8;
         const CXObjCDeclQualifier_Byref = 16;
         const CXObjCDeclQualifier_Oneway = 32;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXObjCPropertyAttrKind: c_uint {
+cenum! {
+    enum CXObjCPropertyAttrKind {
         const CXObjCPropertyAttr_noattr = 0;
         const CXObjCPropertyAttr_readonly = 1;
         const CXObjCPropertyAttr_getter = 2;
         const CXObjCPropertyAttr_assign = 4;
         const CXObjCPropertyAttr_readwrite = 8;
         const CXObjCPropertyAttr_retain = 16;
         const CXObjCPropertyAttr_copy = 32;
         const CXObjCPropertyAttr_nonatomic = 64;
@@ -905,46 +1003,45 @@ bitflags! {
         const CXObjCPropertyAttr_weak = 512;
         const CXObjCPropertyAttr_strong = 1024;
         const CXObjCPropertyAttr_unsafe_unretained = 2048;
         #[cfg(feature="gte_clang_3_9")]
         const CXObjCPropertyAttr_class = 4096;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXReparse_Flags: c_uint {
+cenum! {
+    enum CXReparse_Flags {
         const CXReparse_None = 0;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXSaveTranslationUnit_Flags: c_uint {
+cenum! {
+    enum CXSaveTranslationUnit_Flags {
         const CXSaveTranslationUnit_None = 0;
     }
 }
 
-bitflags! {
-    #[repr(C)]
-    pub struct CXTranslationUnit_Flags: c_uint {
+cenum! {
+    enum CXTranslationUnit_Flags {
         const CXTranslationUnit_None = 0;
         const CXTranslationUnit_DetailedPreprocessingRecord = 1;
         const CXTranslationUnit_Incomplete = 2;
         const CXTranslationUnit_PrecompiledPreamble = 4;
         const CXTranslationUnit_CacheCompletionResults = 8;
         const CXTranslationUnit_ForSerialization = 16;
         const CXTranslationUnit_CXXChainedPCH = 32;
         const CXTranslationUnit_SkipFunctionBodies = 64;
         const CXTranslationUnit_IncludeBriefCommentsInCodeCompletion = 128;
         #[cfg(feature="gte_clang_3_8")]
         const CXTranslationUnit_CreatePreambleOnFirstParse = 256;
         #[cfg(feature="gte_clang_3_9")]
         const CXTranslationUnit_KeepGoing = 512;
+        #[cfg(feature="gte_clang_5_0")]
+        const CXTranslationUnit_SingleFileParse = 1024;
     }
 }
 
 //================================================
 // Structs
 //================================================
 
 // Opaque ________________________________________
@@ -964,16 +1061,18 @@ opaque!(CXFile);
 opaque!(CXIdxClientASTFile);
 opaque!(CXIdxClientContainer);
 opaque!(CXIdxClientEntity);
 opaque!(CXIdxClientFile);
 opaque!(CXIndex);
 opaque!(CXIndexAction);
 opaque!(CXModule);
 opaque!(CXRemapping);
+#[cfg(feature="gte_clang_5_0")]
+opaque!(CXTargetInfo);
 opaque!(CXTranslationUnit);
 
 // Transparent ___________________________________
 
 #[derive(Copy, Clone, Debug)]
 #[repr(C)]
 pub struct CXCodeCompleteResults {
     pub Results: *mut CXCompletionResult,
@@ -1423,25 +1522,29 @@ link! {
     pub fn clang_Cursor_getTemplateArgumentValue(cursor: CXCursor, index: c_uint) -> c_longlong;
     pub fn clang_Cursor_getTranslationUnit(cursor: CXCursor) -> CXTranslationUnit;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_Cursor_hasAttrs(cursor: CXCursor) -> c_uint;
     #[cfg(feature="gte_clang_3_7")]
     pub fn clang_Cursor_isAnonymous(cursor: CXCursor) -> c_uint;
     pub fn clang_Cursor_isBitField(cursor: CXCursor) -> c_uint;
     pub fn clang_Cursor_isDynamicCall(cursor: CXCursor) -> c_int;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_Cursor_isExternalSymbol(cursor: CXCursor, language: *mut CXString, from: *mut CXString, generated: *mut c_uint) -> c_uint;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_Cursor_isFunctionInlined(cursor: CXCursor) -> c_uint;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_Cursor_isMacroBuiltin(cursor: CXCursor) -> c_uint;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_Cursor_isMacroFunctionLike(cursor: CXCursor) -> c_uint;
     pub fn clang_Cursor_isNull(cursor: CXCursor) -> c_int;
     pub fn clang_Cursor_isObjCOptional(cursor: CXCursor) -> c_uint;
     pub fn clang_Cursor_isVariadic(cursor: CXCursor) -> c_uint;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_EnumDecl_isScoped(cursor: CXCursor) -> c_uint;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_EvalResult_dispose(result: CXEvalResult);
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_EvalResult_getAsDouble(result: CXEvalResult) -> libc::c_double;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_EvalResult_getAsInt(result: CXEvalResult) -> c_int;
     #[cfg(feature="gte_clang_4_0")]
     pub fn clang_EvalResult_getAsLongLong(result: CXEvalResult) -> c_longlong;
@@ -1462,27 +1565,35 @@ link! {
     pub fn clang_Module_getASTFile(module: CXModule) -> CXFile;
     pub fn clang_Module_getFullName(module: CXModule) -> CXString;
     pub fn clang_Module_getName(module: CXModule) -> CXString;
     pub fn clang_Module_getNumTopLevelHeaders(tu: CXTranslationUnit, module: CXModule) -> c_uint;
     pub fn clang_Module_getParent(module: CXModule) -> CXModule;
     pub fn clang_Module_getTopLevelHeader(tu: CXTranslationUnit, module: CXModule, index: c_uint) -> CXFile;
     pub fn clang_Module_isSystem(module: CXModule) -> c_int;
     pub fn clang_Range_isNull(range: CXSourceRange) -> c_int;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_TargetInfo_dispose(info: CXTargetInfo);
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_TargetInfo_getPointerWidth(info: CXTargetInfo) -> c_int;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_TargetInfo_getTriple(info: CXTargetInfo) -> CXString;
     pub fn clang_Type_getAlignOf(type_: CXType) -> c_longlong;
     pub fn clang_Type_getCXXRefQualifier(type_: CXType) -> CXRefQualifierKind;
     pub fn clang_Type_getClassType(type_: CXType) -> CXType;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_Type_getNamedType(type_: CXType) -> CXType;
     pub fn clang_Type_getNumTemplateArguments(type_: CXType) -> c_int;
     #[cfg(feature="gte_clang_3_9")]
     pub fn clang_Type_getObjCEncoding(type_: CXType) -> CXString;
     pub fn clang_Type_getOffsetOf(type_: CXType, field: *const c_char) -> c_longlong;
     pub fn clang_Type_getSizeOf(type_: CXType) -> c_longlong;
     pub fn clang_Type_getTemplateArgumentAsType(type_: CXType, index: c_uint) -> CXType;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_Type_isTransparentTagTypedef(type_: CXType) -> c_uint;
     #[cfg(feature="gte_clang_3_7")]
     pub fn clang_Type_visitFields(type_: CXType, visitor: CXFieldVisitor, data: CXClientData) -> CXVisitorResult;
     pub fn clang_annotateTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint, cursors: *mut CXCursor);
     pub fn clang_codeCompleteAt(tu: CXTranslationUnit, file: *const c_char, line: c_uint, column: c_uint, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXCodeComplete_Flags) -> *mut CXCodeCompleteResults;
     pub fn clang_codeCompleteGetContainerKind(results: *mut CXCodeCompleteResults, incomplete: *mut c_uint) -> CXCursorKind;
     pub fn clang_codeCompleteGetContainerUSR(results: *mut CXCodeCompleteResults) -> CXString;
     pub fn clang_codeCompleteGetContexts(results: *mut CXCodeCompleteResults) -> c_ulonglong;
     pub fn clang_codeCompleteGetDiagnostic(results: *mut CXCodeCompleteResults, index: c_uint) -> CXDiagnostic;
@@ -1524,16 +1635,18 @@ link! {
     pub fn clang_equalRanges(left: CXSourceRange, right: CXSourceRange) -> c_uint;
     pub fn clang_equalTypes(left: CXType, right: CXType) -> c_uint;
     pub fn clang_executeOnThread(function: extern fn(*mut c_void), data: *mut c_void, stack: c_uint);
     pub fn clang_findIncludesInFile(tu: CXTranslationUnit, file: CXFile, cursor: CXCursorAndRangeVisitor) -> CXResult;
     pub fn clang_findReferencesInFile(cursor: CXCursor, file: CXFile, visitor: CXCursorAndRangeVisitor) -> CXResult;
     pub fn clang_formatDiagnostic(diagnostic: CXDiagnostic, flags: CXDiagnosticDisplayOptions) -> CXString;
     #[cfg(feature="gte_clang_3_7")]
     pub fn clang_free(buffer: *mut c_void);
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_getAddressSpace(type_: CXType) -> c_uint;
     #[cfg(feature="gte_clang_4_0")]
     pub fn clang_getAllSkippedRanges(tu: CXTranslationUnit) -> *mut CXSourceRangeList;
     pub fn clang_getArgType(type_: CXType, index: c_uint) -> CXType;
     pub fn clang_getArrayElementType(type_: CXType) -> CXType;
     pub fn clang_getArraySize(type_: CXType) -> c_longlong;
     pub fn clang_getCString(string: CXString) -> *const c_char;
     pub fn clang_getCXTUResourceUsage(tu: CXTranslationUnit) -> CXTUResourceUsage;
     pub fn clang_getCXXAccessSpecifier(cursor: CXCursor) -> CX_CXXAccessSpecifier;
@@ -1550,16 +1663,18 @@ link! {
     pub fn clang_getCompletionNumAnnotations(string: CXCompletionString) -> c_uint;
     pub fn clang_getCompletionParent(string: CXCompletionString, kind: *mut CXCursorKind) -> CXString;
     pub fn clang_getCompletionPriority(string: CXCompletionString) -> c_uint;
     pub fn clang_getCursor(tu: CXTranslationUnit, location: CXSourceLocation) -> CXCursor;
     pub fn clang_getCursorAvailability(cursor: CXCursor) -> CXAvailabilityKind;
     pub fn clang_getCursorCompletionString(cursor: CXCursor) -> CXCompletionString;
     pub fn clang_getCursorDefinition(cursor: CXCursor) -> CXCursor;
     pub fn clang_getCursorDisplayName(cursor: CXCursor) -> CXString;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_getCursorExceptionSpecificationType(cursor: CXCursor) -> CXCursor_ExceptionSpecificationKind;
     pub fn clang_getCursorExtent(cursor: CXCursor) -> CXSourceRange;
     pub fn clang_getCursorKind(cursor: CXCursor) -> CXCursorKind;
     pub fn clang_getCursorKindSpelling(kind: CXCursorKind) -> CXString;
     pub fn clang_getCursorLanguage(cursor: CXCursor) -> CXLanguageKind;
     pub fn clang_getCursorLexicalParent(cursor: CXCursor) -> CXCursor;
     pub fn clang_getCursorLinkage(cursor: CXCursor) -> CXLinkageKind;
     pub fn clang_getCursorLocation(cursor: CXCursor) -> CXSourceLocation;
     pub fn clang_getCursorPlatformAvailability(cursor: CXCursor, deprecated: *mut c_int, deprecated_message: *mut CXString, unavailable: *mut c_int, unavailable_message: *mut CXString, availability: *mut CXPlatformAvailability, n_availability: c_int) -> c_int;
@@ -1587,16 +1702,18 @@ link! {
     pub fn clang_getDiagnosticRange(diagnostic: CXDiagnostic, index: c_uint) -> CXSourceRange;
     pub fn clang_getDiagnosticSetFromTU(tu: CXTranslationUnit) -> CXDiagnosticSet;
     pub fn clang_getDiagnosticSeverity(diagnostic: CXDiagnostic) -> CXDiagnosticSeverity;
     pub fn clang_getDiagnosticSpelling(diagnostic: CXDiagnostic) -> CXString;
     pub fn clang_getElementType(type_: CXType) -> CXType;
     pub fn clang_getEnumConstantDeclUnsignedValue(cursor: CXCursor) -> c_ulonglong;
     pub fn clang_getEnumConstantDeclValue(cursor: CXCursor) -> c_longlong;
     pub fn clang_getEnumDeclIntegerType(cursor: CXCursor) -> CXType;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_getExceptionSpecificationType(type_: CXType) -> CXCursor_ExceptionSpecificationKind;
     pub fn clang_getExpansionLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
     pub fn clang_getFieldDeclBitWidth(cursor: CXCursor) -> c_int;
     pub fn clang_getFile(tu: CXTranslationUnit, file: *const c_char) -> CXFile;
     pub fn clang_getFileLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
     pub fn clang_getFileName(file: CXFile) -> CXString;
     pub fn clang_getFileTime(file: CXFile) -> time_t;
     pub fn clang_getFileUniqueID(file: CXFile, id: *mut CXFileUniqueID) -> c_int;
     pub fn clang_getFunctionTypeCallingConv(type_: CXType) -> CXCallingConv;
@@ -1625,27 +1742,31 @@ link! {
     pub fn clang_getRangeStart(range: CXSourceRange) -> CXSourceLocation;
     pub fn clang_getRemappings(file: *const c_char) -> CXRemapping;
     pub fn clang_getRemappingsFromFileList(files: *mut *const c_char, n_files: c_uint) -> CXRemapping;
     pub fn clang_getResultType(type_: CXType) -> CXType;
     pub fn clang_getSkippedRanges(tu: CXTranslationUnit, file: CXFile) -> *mut CXSourceRangeList;
     pub fn clang_getSpecializedCursorTemplate(cursor: CXCursor) -> CXCursor;
     pub fn clang_getSpellingLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
     pub fn clang_getTUResourceUsageName(kind: CXTUResourceUsageKind) -> *const c_char;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_getTranslationUnitTargetInfo(tu: CXTranslationUnit) -> CXTargetInfo;
     pub fn clang_getTemplateCursorKind(cursor: CXCursor) -> CXCursorKind;
     pub fn clang_getTokenExtent(tu: CXTranslationUnit, token: CXToken) -> CXSourceRange;
     pub fn clang_getTokenKind(token: CXToken) -> CXTokenKind;
     pub fn clang_getTokenLocation(tu: CXTranslationUnit, token: CXToken) -> CXSourceLocation;
     pub fn clang_getTokenSpelling(tu: CXTranslationUnit, token: CXToken) -> CXString;
     pub fn clang_getTranslationUnitCursor(tu: CXTranslationUnit) -> CXCursor;
     pub fn clang_getTranslationUnitSpelling(tu: CXTranslationUnit) -> CXString;
     pub fn clang_getTypeDeclaration(type_: CXType) -> CXCursor;
     pub fn clang_getTypeKindSpelling(type_: CXTypeKind) -> CXString;
     pub fn clang_getTypeSpelling(type_: CXType) -> CXString;
     pub fn clang_getTypedefDeclUnderlyingType(cursor: CXCursor) -> CXType;
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_getTypedefName(type_: CXType) -> CXString;
     pub fn clang_hashCursor(cursor: CXCursor) -> c_uint;
     pub fn clang_indexLoc_getCXSourceLocation(location: CXIdxLoc) -> CXSourceLocation;
     pub fn clang_indexLoc_getFileLocation(location: CXIdxLoc, index_file: *mut CXIdxClientFile, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
     pub fn clang_indexSourceFile(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, index_flags: CXIndexOptFlags, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, tu: *mut CXTranslationUnit, tu_flags: CXTranslationUnit_Flags) -> CXErrorCode;
     #[cfg(feature="gte_clang_3_8")]
     pub fn clang_indexSourceFileFullArgv(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, index_flags: CXIndexOptFlags, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, tu: *mut CXTranslationUnit, tu_flags: CXTranslationUnit_Flags) -> CXErrorCode;
     pub fn clang_indexTranslationUnit(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, flags: CXIndexOptFlags, tu: CXTranslationUnit) -> c_int;
     pub fn clang_index_getCXXClassDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxCXXClassDeclInfo;
@@ -1683,16 +1804,18 @@ link! {
     #[cfg(feature="gte_clang_3_8")]
     pub fn clang_parseTranslationUnit2FullArgv(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags, tu: *mut CXTranslationUnit) -> CXErrorCode;
     pub fn clang_remap_dispose(remapping: CXRemapping);
     pub fn clang_remap_getFilenames(remapping: CXRemapping, index: c_uint, original: *mut CXString, transformed: *mut CXString);
     pub fn clang_remap_getNumFiles(remapping: CXRemapping) -> c_uint;
     pub fn clang_reparseTranslationUnit(tu: CXTranslationUnit, n_unsaved: c_uint, unsaved: *mut CXUnsavedFile, flags: CXReparse_Flags) -> CXErrorCode;
     pub fn clang_saveTranslationUnit(tu: CXTranslationUnit, file: *const c_char, options: CXSaveTranslationUnit_Flags) -> CXSaveError;
     pub fn clang_sortCodeCompletionResults(results: *mut CXCompletionResult, n_results: c_uint);
+    #[cfg(feature="gte_clang_5_0")]
+    pub fn clang_suspendTranslationUnit(tu: CXTranslationUnit) -> c_uint;
     pub fn clang_toggleCrashRecovery(recovery: c_uint);
     pub fn clang_tokenize(tu: CXTranslationUnit, range: CXSourceRange, tokens: *mut *mut CXToken, n_tokens: *mut c_uint);
     pub fn clang_visitChildren(cursor: CXCursor, visitor: CXCursorVisitor, data: CXClientData) -> c_uint;
 
     // Documentation
     pub fn clang_BlockCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString;
     pub fn clang_BlockCommandComment_getCommandName(comment: CXComment) -> CXString;
     pub fn clang_BlockCommandComment_getNumArgs(comment: CXComment) -> c_uint;
--- a/third_party/rust/clang-sys/src/link.rs
+++ b/third_party/rust/clang-sys/src/link.rs
@@ -176,10 +176,15 @@ macro_rules! link {
         }
     )
 }
 
 #[cfg(not(feature="runtime"))]
 macro_rules! link {
     ($($(#[cfg($cfg:meta)])* pub fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*;)+) => (
         extern { $($(#[cfg($cfg)])* pub fn $name($($pname: $pty), *) $(-> $ret)*;)+ }
+
+        $($(#[cfg($cfg)])*
+        pub mod $name {
+            pub fn is_loaded() -> bool { true }
+        })+
     )
 }
--- a/third_party/rust/clang-sys/src/support.rs
+++ b/third_party/rust/clang-sys/src/support.rs
@@ -133,17 +133,17 @@ fn is_executable(path: &Path) -> io::Res
     use std::ffi::CString;
     use std::os::unix::ffi::OsStrExt;
 
     let path = CString::new(path.as_os_str().as_bytes())?;
     unsafe { Ok(libc::access(path.as_ptr(), libc::X_OK) == 0) }
 }
 
 #[cfg(not(unix))]
-fn is_executable(path: &Path) -> io::Result<bool> {
+fn is_executable(_: &Path) -> io::Result<bool> {
     Ok(true)
 }
 
 /// Attempts to run an executable, returning the `stdout` and `stderr` output if successful.
 fn run(executable: &str, arguments: &[&str]) -> Result<(String, String), String> {
     Command::new(executable).args(arguments).output().map(|o| {
         let stdout = String::from_utf8_lossy(&o.stdout).into_owned();
         let stderr = String::from_utf8_lossy(&o.stderr).into_owned();
--- a/third_party/rust/clang-sys/tests/lib.rs
+++ b/third_party/rust/clang-sys/tests/lib.rs
@@ -14,17 +14,17 @@ fn parse() {
 
         let tu = clang_parseTranslationUnit(
             index,
             "tests/header.h\0".as_ptr() as *const c_char,
             ptr::null_mut(),
             0,
             ptr::null_mut(),
             0,
-            CXTranslationUnit_Flags::empty(),
+            0,
         );
         assert!(!tu.is_null());
     }
 }
 
 #[cfg(feature="runtime")]
 #[test]
 fn test() {
--- a/toolkit/library/gtest/rust/Cargo.lock
+++ b/toolkit/library/gtest/rust/Cargo.lock
@@ -139,23 +139,23 @@ source = "registry+https://github.com/ru
 dependencies = [
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bindgen"
-version = "0.29.0"
+version = "0.29.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "clang-sys 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clang-sys 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.24.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "quasi 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "quasi_codegen 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -202,20 +202,19 @@ dependencies = [
 
 [[package]]
 name = "cfg-if"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "clang-sys"
-version = "0.19.0"
+version = "0.21.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
  "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "clap"
 version = "2.24.2"
@@ -1265,17 +1264,17 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.21.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fallible 0.0.1",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
@@ -1639,26 +1638,26 @@ dependencies = [
 "checksum arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "699e63a93b79d717e8c3b5eb1b28b7780d0d6d9e59a72eb769291c83b0c8dc67"
 "checksum aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0"
 "checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
 "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
 "checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"
 "checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"
 "checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
 "checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"
-"checksum bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c338079dafc81bef7d581f494b906603d12359c4306979eae6ca081925a4984"
+"checksum bindgen 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ba610cba0c1727ed837316540068b51349b8268c073906067b7c3948598929bd"
 "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
 "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
 "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
 "checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
 "checksum boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8380105befe91099e6f69206164072c05bc92427ff6aa8a5171388317346dd75"
 "checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
 "checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
 "checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
-"checksum clang-sys 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a"
+"checksum clang-sys 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5955eab05fa8e6ff2b353753dc73a0608daa36e472a21c69f2eb51f43f593544"
 "checksum clap 2.24.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f"
 "checksum coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd"
 "checksum core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f51ce3b8ebe311c56de14231eb57572c15abebd2d32b3bcb99bcdb9c101f5ac3"
 "checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
 "checksum core-graphics 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f841e9637adec70838c537cae52cb4c751cc6514ad05669b51d107c2021c79"
 "checksum core-text 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "16ce16d9ed00181016c11ff48e561314bec92bfbce9fe48f319366618d4e5de6"
 "checksum cssparser 0.21.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89af8ca7a36c8c591a9ff56ffb88ea2597095d8c1b834af9ca5be5032dcfe06e"
 "checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df"
--- a/toolkit/library/rust/Cargo.lock
+++ b/toolkit/library/rust/Cargo.lock
@@ -137,23 +137,23 @@ source = "registry+https://github.com/ru
 dependencies = [
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bindgen"
-version = "0.29.0"
+version = "0.29.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "clang-sys 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clang-sys 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.24.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "quasi 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "quasi_codegen 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -200,20 +200,19 @@ dependencies = [
 
 [[package]]
 name = "cfg-if"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "clang-sys"
-version = "0.19.0"
+version = "0.21.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
  "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "clap"
 version = "2.24.2"
@@ -1252,17 +1251,17 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.21.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fallible 0.0.1",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
@@ -1626,26 +1625,26 @@ dependencies = [
 "checksum arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "699e63a93b79d717e8c3b5eb1b28b7780d0d6d9e59a72eb769291c83b0c8dc67"
 "checksum aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0"
 "checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
 "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
 "checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"
 "checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"
 "checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
 "checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"
-"checksum bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c338079dafc81bef7d581f494b906603d12359c4306979eae6ca081925a4984"
+"checksum bindgen 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ba610cba0c1727ed837316540068b51349b8268c073906067b7c3948598929bd"
 "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
 "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
 "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
 "checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
 "checksum boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8380105befe91099e6f69206164072c05bc92427ff6aa8a5171388317346dd75"
 "checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
 "checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
 "checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
-"checksum clang-sys 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a"
+"checksum clang-sys 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5955eab05fa8e6ff2b353753dc73a0608daa36e472a21c69f2eb51f43f593544"
 "checksum clap 2.24.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f"
 "checksum coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd"
 "checksum core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f51ce3b8ebe311c56de14231eb57572c15abebd2d32b3bcb99bcdb9c101f5ac3"
 "checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
 "checksum core-graphics 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f841e9637adec70838c537cae52cb4c751cc6514ad05669b51d107c2021c79"
 "checksum core-text 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "16ce16d9ed00181016c11ff48e561314bec92bfbce9fe48f319366618d4e5de6"
 "checksum cssparser 0.21.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89af8ca7a36c8c591a9ff56ffb88ea2597095d8c1b834af9ca5be5032dcfe06e"
 "checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df"