There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations

llvm-svn: 77546
This commit is contained in:
Douglas Gregor
2009-07-29 23:41:44 +00:00
parent 97fb3e5323
commit 82c80a59ee

View File

@@ -685,9 +685,6 @@ TagDecl* TagDecl::getDefinition(ASTContext& C) const {
if (isDefinition())
return const_cast<TagDecl *>(this);
if (TagType *TagT = const_cast<TagType *>(TypeForDecl->getAs<TagType>()))
return TagT->getDecl()->isDefinition()? TagT->getDecl() : 0;
for (redecl_iterator R = redecls_begin(), REnd = redecls_end();
R != REnd; ++R)
if (R->isDefinition())