A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 394f0ee..ec28f47 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1359,13 +1359,8 @@
CXXRecordDecl *Record = cast<CXXRecordDecl>(Owner);
New->setAccess(Tmpl->getAccess());
- if (Tmpl->isVirtualAsWritten()) {
- New->setVirtualAsWritten(true);
- Record->setAggregate(false);
- Record->setPOD(false);
- Record->setEmpty(false);
- Record->setPolymorphic(true);
- }
+ if (Tmpl->isVirtualAsWritten())
+ Record->setMethodAsVirtual(New);
// FIXME: attributes
// FIXME: New needs a pointer to Tmpl