]> granicus.if.org Git - clang/commit
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)
commitf4a5e8f33e88cd065c3ac93b5304cba83fe36ef7
tree753f564fd0f3b60e0e04f342978772a5e78892b8
parent5dee4f4e7262b676bdae50bbd1921683b7a84ae7
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288850 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/warn-weak-vtables.cpp