Recommit "Support attribute used in member funcs of class templates"
The patch originally broke code that was incompatible with GCC, but
we want to follow GCC behavior here according to the discussion in
Original commit message:
As PR17480 describes, clang does not support the used attribute
for member functions of class templates. This means that if the member
function is not used, its definition is never instantiated. This patch
changes clang to emit the definition if it has the used attribute.
Test Plan: Added a testcase
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D56928