]> granicus.if.org Git - clang/commit
When marking virtual functions as used for a class' vtable, mark all functions
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 7 Jul 2012 06:59:51 +0000 (06:59 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 7 Jul 2012 06:59:51 +0000 (06:59 +0000)
commitff817f7070c0308e9d4486432b774005d4f8e420
treee6285ec9559b2ec29884d288587eebeab57d5f4a
parent0f3d0970dcdf6cf17550b86838dff12813968dbc
When marking virtual functions as used for a class' vtable, mark all functions
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159895 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/CodeGenCXX/virt-template-vtable.cpp
test/SemaTemplate/instantiate-exception-spec-cxx11.cpp