Add an assert to make sure that we don't try to mess with overridden methods for class templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94907 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson 2010-01-30 17:42:34 +00:00
Родитель 7297c18c84
Коммит c076c450e4
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -604,7 +604,9 @@ static OverriddenMethodsMapTy *OverriddenMethods = 0;
void CXXMethodDecl::addOverriddenMethod(const CXXMethodDecl *MD) {
assert(MD->isCanonicalDecl() && "Method is not canonical!");
assert(!MD->getParent()->isDependentContext() &&
"Can't add an overridden method to a class template!");
// FIXME: The CXXMethodDecl dtor needs to remove and free the entry.
if (!OverriddenMethods)