* [cxx-interop] fix std::string::push_back by fixing mapping between clang/swift self/this type for cxx methods
* cleanup
* Fix unit test
* XFail test: operators/member-inline on linux-android
* add `C++` in expandExternalSignatureTypes comment
* Fix rebase
* Fix mapping issue in externalizeArguments
* Improve cxx_interop_ir test regex
This change makes ClangImporter import some C++ member functions as non-mutating, given that they satisfy two requirements:
* the function itself is marked as `const`
* the parent struct doesn't contain any `mutable` members
`get` accessors of subscript operators are now also imported as non-mutating if the C++ `operator[]` satisfies the requirements above.
Fixes SR-12795.
C++ namespaces are imported as Swift enums, so let's mangle them as enums.
This fixes lookup of nested namespaces, for example, `std.__1`: previously during demangling the `__1` decl was filtered out in `ASTBuilder::getAcceptableTypeDeclCandidate` as it expects `Demangle::Node::Kind::Structure` instead of `Demangle::Node::Kind::Enum`. This caused "Failed to reconstruct type for x" error.
C++ namespaces are module-independent, but enums are owned by their module's in Swift. So, to prevent declaring two enums with the same name, this patch implements a new approach to namespaces: enums with extensions.
Here's an example:
```
// Module A
namespace N { void test1(); }
// Module B
namespace N { void test2(); }
// __ObjC module
enum N { }
// Swift module A
extension N { func test1() }
// Swift module B
extension N { func test1() }
```
Thanks to @gribozavr for the great idea.
Add an convert to the new `target-swiftxx-frontend` substitution in lit
to control the C++ interop enabling in Swift. This allows for a single
site which will enable control of both an overridden standard (for
testing multiple C++ standards) and simplify writing tests.
When a c++ namespace IRGens for reflection, it triggers a path that
expects the namespace to have a particular form. Because it is always
empty, we can treat it just like an empty swift enum.