The test case I added used to fail because of a linker error.
Linkage failed because Sema::MarkDeclRefReferenced would prevent the virtual method definition from being emitted by setting OdrUse=false and then code-gen would devirtualized the virtual call because its class is marked final.
This patch fixes the bug.
rdar://problem/27455779