I am converting C++ code to C++11. Since C++11 supports move construction I am replacing methods like
void foo(const Bar& obj);
with
void foo(Bar obj);
in places where I think it makes sense, for example in assignment operators. Unfortunately, the only way I know of that detects if the move constructor is actually used is adding debug messages and run the code.
What I would like to have is information about what the compiler is doing while compiling the source, to get an idea where it is using move construction and where not (and possibly why) so that I can get a better understanding where I need to change the program and where changes actually improved it (to avoid unnecessary copy constructions).
Is there a way to get this information? Maybe with CLang?