summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-08 22:33:38 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-08 22:33:38 +0000
commit6111db9e9cde94262624891fd29d8225f4bc9de1 (patch)
tree1cfb0218222f0d67b07c00eb65b2efbd99a5eb1e
parent2201582115f91ea5ef27b83ba8f30e8f7a14d9fe (diff)
downloadbcm5719-llvm-6111db9e9cde94262624891fd29d8225f4bc9de1.tar.gz
bcm5719-llvm-6111db9e9cde94262624891fd29d8225f4bc9de1.zip
Fixed isEmbeddedInDeclarator flag loading.
llvm-svn: 127285
-rw-r--r--clang/lib/Sema/SemaType.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 11e7c313829..20a85225a46 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -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;
OpenPOWER on IntegriCloud