[cfe-commits] r94907 - /cfe/trunk/lib/AST/DeclCXX.cpp
Anders Carlsson
andersca at mac.com
Sat Jan 30 09:42:34 PST 2010
Author: andersca
Date: Sat Jan 30 11:42:34 2010
New Revision: 94907
URL: http://llvm.org/viewvc/llvm-project?rev=94907&view=rev
Log:
Add an assert to make sure that we don't try to mess with overridden methods for class templates.
Modified:
cfe/trunk/lib/AST/DeclCXX.cpp
Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=94907&r1=94906&r2=94907&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Sat Jan 30 11:42:34 2010
@@ -604,7 +604,9 @@
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)
More information about the cfe-commits
mailing list