Explanation: Fixes a runtime crash in the generated binary due to
mismatched calling convention when calling a function taking an rvalue
reference.
Scope: Affects C++ APIs taking rvalue references to directly passed
types (e.g., trivially destructible types).
Issue: rdar://148585343
Risk: Low, targeted to rvalue references which is a newly supported
feature.
Testing: Added tests to test suite
Reviewer: John Hui
The type bridging logic assumed that if a value of type `Swift.Bool` is passed to a Clang function as an argument, then the type of the parameter must be a Clang built-in type (usually `_Bool`). This is not always correct. For instance, the type might be a templated const reference.
rdar://125508505
Restore the explicit C++ standard for these tests as the C++ compiler
invocation on Darwin uses the system compiler rather than the just built
clang, which may be sufficiently different to have different default
standards.
This will be cleaned up with the next change to introduce a new
`%target-clangxx` to control the C++ standard.
Do not override the C++ standard explicitly when running the tests.
This will eventually be useful in allowing tests to run against
different C++ standards.