]> granicus.if.org Git - clang/commitdiff
Fixed isEmbeddedInDeclarator flag loading.
authorAbramo Bagnara <abramo.bagnara@gmail.com>
Tue, 8 Mar 2011 22:33:38 +0000 (22:33 +0000)
committerAbramo Bagnara <abramo.bagnara@gmail.com>
Tue, 8 Mar 2011 22:33:38 +0000 (22:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127285 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaType.cpp

index 11e7c3138296cdd69c054f44c8cb2837db50c3ac..20a85225a468733df4b474ee5b59ad0d02f69a6c 100644 (file)
@@ -1503,10 +1503,8 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
     
     if (!D.isInvalidType() && D.getDeclSpec().isTypeSpecOwned()) {
       TagDecl* Owned = cast<TagDecl>(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;