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
Something like CXXMethodDecl *getDevirtualizedMethod(...) would fit in better with the current API. E.g, getCorrespondingMethodInClass is done this way (and returns nullptr when a method is not found).