Age | Commit message (Collapse) | Author |
|
This re-uses the infrastructure used when asserting that
`ItemAncestorsIter` does not infinitely loop in `ir::Item::name_target`.
|
|
In non-release builds with debug assertions, keep track of the set of
`ItemId`s that we have iterated over in `ItemAncestorsIter` and make
sure that we don't reach an ancestor we have already yielded, which
would trigger an infinite loop.
|
|
This fixes `ItemCanonicalPath` to return paths of the form `[module*,
item]` rather than `[item*, item]`. That is, there will only be module
names before the item's name, rather than also other arbitrary item
names (such as parent structs).
Fixes #311
|
|
Use the generated root module via a relative path
We previously generated uses of the root module with absolute paths:
use root;
However this only works if the generated bindings are the root of the
crate. If they were in some submodule then that path would not be
valid. They are now generated relative to the current module, like this:
use self::super::super::root;
Fixes #96
r? @emilio
|
|
We previously generated uses of the root module with absolute paths:
use root;
However this only works if the generated bindings are the root of the
crate. If they were in some submodule then that path would not be
valid. They are now generated relative to the current module, like this:
use self::super::super::root;
Fixes #96
|
|
Unify naming methods into a single method + options builder type
Some of these changes are still under the question but I guess it's how @fitzgen describe it in issue #201.
|
|
This an implementation of `NameOptions` structure which will hold
flags for building a name string. This fixes related to issue #201
|
|
Bunch of fixes for stylo and libclang 4
r? @fitzgen or @nox
|
|
|
|
|
|
Restore links in README.md
These were deleted accidentally in 073b12ff35a8ec6314d655804915f177ce453227.
|
|
These were deleted accidentally in 073b12ff35a8ec6314d655804915f177ce453227.
|
|
|
|
|
|
clang::Cursor::enum_type should return an Option<Type>
Returning an Option<Type> relieves callers from having to check whether clang::Cursor::enum_type returns `CXType_Invalid`.
Fixes #125
|
|
|
|
As discussed with @emilio. Part of #125.
|
|
Thanks for pointing this out @emilio.
|
|
ir: Rework how we discover children of modules.
r? @fitzgen
|
|
|
|
A more coherent story for whitelisting.
r? @fitzgen
Fixes #300
Fixes #299
Fixes #298
|
|
|
|
|
|
ir: Deduplicate namespaces.
|
|
|
|
Trace function signature types
This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.
Fixes #291
r? @emilio
|
|
This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.
Fixes #291
|
|
First steps to fix issue #57
This should generate tests for fully specialized templates.
TODO:
- [x] Tests
r? @emilio
|
|
Recurse on the inner type when finding a template alias name target
The assertion that the template alias's inner type was our name target,
and that we didn't need to recurse, is failing when generating
SpiderMonkey bindings. I'm not 100% sure when this can happen, but
clearly it can, and it is easy to support, so let's support it.
r? @emilio
|
|
The assertion that the template alias's inner type was our name target,
and that we didn't need to recurse, is failing when generating
SpiderMonkey bindings. I'm not 100% sure when this can happen, but
clearly it can, and it is easy to support, so let's support it.
|
|
Do not evaluate variadic template types
This is a workaround for an internal clang assertion that gets triggered
if we try to evaluate a variadic template type reference.
Fixes #283
r? @emilio
|
|
Better handling of derived types inside namespaces.
Not perfect, since for example we can never arrive to the `Type` typedef it seems, but it doesn't generate invalid code, and we handle correctly the non-dependent types.
r? @fitzgen
|
|
|
|
|
|
|
|
|
|
codegen: Fix whitelisting inside namespaces.
fixes #287
r? @fitzgen
|
|
|
|
|
|
|
|
|
|
Fixes issue #125
|
|
|
|
|
|
|
|
This is a workaround for an internal clang assertion that gets triggered
if we try to evaluate a variadic template type reference.
Fixes #283
|
|
clang::Cursor::args should return an Option<Vec<Cursor>>
Attempt to fix #130
|
|
Include namespaces in mangled symbols
When we aren't using `--enable-cxx-namespaces`, we can end up with
conflicting struct symbol names that we need to disambiguate. The
solution is to mangle the namespaced C++ symbol "foo::bar::Baz" into the
Rust "foo_bar_Baz" symbol.
This did change the way anonymous types and modules get named a little,
but I think our approach is much more sane now than it was before.
Fixes #267.
r? @emilio
|
|
|
|
When we aren't using `--enable-cxx-namespaces`, we can end up with
conflicting struct symbol names that we need to disambiguate. The
solution is to mangle the namespaced C++ symbol "foo::bar::Baz" into the
Rust "foo_bar_Baz" symbol.
|