From: Abramo Bagnara Date: Tue, 8 Mar 2011 22:33:38 +0000 (+0000) Subject: Fixed isEmbeddedInDeclarator flag loading. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15987970eeaa1842c29ec8797affd1c1dea05585;p=clang Fixed isEmbeddedInDeclarator flag loading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127285 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 11e7c31382..20a85225a4 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1503,10 +1503,8 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S, if (!D.isInvalidType() && D.getDeclSpec().isTypeSpecOwned()) { TagDecl* Owned = cast(D.getDeclSpec().getRepAsDecl()); - // Owned is embedded if it was defined here, or if it is the - // very first (i.e., canonical) declaration of this tag type. - Owned->setEmbeddedInDeclarator(Owned->isDefinition() || - Owned->isCanonicalDecl()); + // Owned declaration is embedded in declarator. + Owned->setEmbeddedInDeclarator(true); if (OwnedDecl) *OwnedDecl = Owned; } break;