From: Douglas Gregor Date: Wed, 29 Jul 2009 23:41:44 +0000 (+0000) Subject: There's no point in going through the getAs stuff to find the definition... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5bb6d49522f5119740a2c87e466725300fee88f;p=clang There's no point in going through the getAs stuff to find the definition of a tag, since tags rarely have more than one or two declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77546 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 240922afd8..6d2f2301ba 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -685,9 +685,6 @@ TagDecl* TagDecl::getDefinition(ASTContext& C) const { if (isDefinition()) return const_cast(this); - if (TagType *TagT = const_cast(TypeForDecl->getAs())) - return TagT->getDecl()->isDefinition()? TagT->getDecl() : 0; - for (redecl_iterator R = redecls_begin(), REnd = redecls_end(); R != REnd; ++R) if (R->isDefinition())