aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-16 14:45:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-16 14:45:37 +0000
commit75c3240472ba6ac2669ee72ca67eb72d4e2851fc (patch)
tree08fb6355e2578881591fdc8bac23dca750642e0b /lib/Sema/SemaDeclCXX.cpp
parentb5ea630dfd1a0d3e5c08d8959158608dd213d9aa (diff)
downloadsrc-75c3240472ba6ac2669ee72ca67eb72d4e2851fc.tar.gz
src-75c3240472ba6ac2669ee72ca67eb72d4e2851fc.zip
Vendor import of clang 5.0.1 release r320880:vendor/clang/clang-release_501-r320880
Notes
Notes: svn path=/vendor/clang/dist/; revision=326901 svn path=/vendor/clang/clang-release_501-r320880/; revision=326902; tag=vendor/clang/clang-release_501-r320880
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index c05e5f020708..28323f365af7 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -826,7 +826,10 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
NamedDecl *New =
ActOnVariableDeclarator(S, D, DC, TInfo, Previous,
MultiTemplateParamsArg(), AddToScope, Bindings);
- CurContext->addHiddenDecl(New);
+ if (AddToScope) {
+ S->AddDecl(New);
+ CurContext->addHiddenDecl(New);
+ }
if (isInOpenMPDeclareTargetContext())
checkDeclIsAllowedInOpenMPTarget(nullptr, New);