Disable -Wweak-vtables when there are no key functions
authorReid Kleckner <rnk@google.com>
Tue, 6 Dec 2016 21:44:41 +0000 (21:44 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 6 Dec 2016 21:44:41 +0000 (21:44 +0000)
commitb792e0694b678e08832d5cfcb52d800c6f1a01aa
tree1eb0ef046e6b1006d07a41e632201628ab208322
parent00cfa747156c8a7bb25be3e6a85272a61b0b15ca
Disable -Wweak-vtables when there are no key functions

Our -Wweak-vtables diagnostic is powered by our key function
calculation, which checks if key functions are enabled. We won't find
any key functions in C++ ABIs that lack key functions, so -Wweak-vtables
was warning on every dynamic class before this change. So, turn off this
warning in ABIs without key functions.

Addresses PR31220

llvm-svn: 288850
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/SemaCXX/warn-weak-vtables.cpp