Simplest example:
struct A {};
struct B : public A {};
void Call(A&) {}
int main() { Call(B()); return 0; }
This goes through in MSVC. This doesn't go through with clang 7.0.0-3:
test.cpp:4:14: error: no matching function for call to 'Call'
int main() { Call(B()); return 0; }
^~~~
test.cpp:3:6: note: candidate function not viable: no known conversion from 'B' to 'A &' for 1st argument
void Call(A&) {}
^
Why?
I would've expected the constructor to be called, the object being kept in memory by main(), the reference being honored for the function call, and then the object being destroyed once the Call() function is executed. Instead, it simply doesn't compile.