summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/no-devirt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Mark a virtual CXXMethodDecl as used if a call to it can beAkira Hatanaka2017-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devirtualized. The code to detect devirtualized calls is already in IRGen, so move the code to lib/AST and make it a shared utility between Sema and IRGen. This commit fixes a linkage error I was seeing when compiling the following code: $ cat test1.cpp struct Base { virtual void operator()() {} }; template<class T> struct Derived final : Base { void operator()() override {} }; Derived<int> *d; int main() { if (d) (*d)(); return 0; } rdar://problem/33195657 Differential Revision: https://reviews.llvm.org/D34301 llvm-svn: 307883
* Prevent devirtualization of calls to un-instantiated functions.Sunil Srivastava2017-06-201-0/+59
PR 27895 Differential Revision: https://reviews.llvm.org/D22057 llvm-svn: 305862
OpenPOWER on IntegriCloud