summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-08-14 10:59:44 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-08-14 10:59:44 +0000
commitb176693d9941bb3a8c971d2d2c62723d5c9d59d9 (patch)
treedbaa608c77e982bf87f0d9a0899e042393a5691a /clang/lib/Sema/SemaDecl.cpp
parent6a9edda356b01b80fd66a064836aa811547d3c02 (diff)
downloadbcm5719-llvm-b176693d9941bb3a8c971d2d2c62723d5c9d59d9.tar.gz
bcm5719-llvm-b176693d9941bb3a8c971d2d2c62723d5c9d59d9.zip
Set the lexical context for dummy tag decl inside createTagFromNewDecl
This is a follow-up to r310706. This change has been recommended by Bruno Cardoso Lopes and Richard Smith. llvm-svn: 310829
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 667eddec1e1..8334adbbc07 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -13298,6 +13298,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
AddMsStructLayoutForRecord(RD);
}
}
+ New->setLexicalDeclContext(CurContext);
return New;
};
@@ -13723,7 +13724,6 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
// comparison.
SkipBody->CheckSameAsPrevious = true;
SkipBody->New = createTagFromNewDecl();
- SkipBody->New->setLexicalDeclContext(CurContext);
SkipBody->Previous = Hidden;
} else {
SkipBody->ShouldSkip = true;
OpenPOWER on IntegriCloud