]> granicus.if.org Git - clang/commitdiff
There's no point in going through the getAs<TagType> stuff to find the definition...
authorDouglas Gregor <dgregor@apple.com>
Wed, 29 Jul 2009 23:41:44 +0000 (23:41 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 29 Jul 2009 23:41:44 +0000 (23:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77546 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Decl.cpp

index 240922afd8619a0a442f1162c7b16b76945cd67b..6d2f2301ba40d10696ab1d7b38ce6fd70f747947 100644 (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())