diff options
| author | 2017-03-14 08:07:52 +0000 | |
|---|---|---|
| committer | 2017-03-14 08:07:52 +0000 | |
| commit | 1cb66ada17adf0954eaadba4d02ec2470365a3ac (patch) | |
| tree | 521159d8f39562a43fffd680147eb5a71709b9b1 /gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
| parent | Mark the sshd_config UsePrivilegeSeparation option as deprecated, (diff) | |
| download | wireguard-openbsd-1cb66ada17adf0954eaadba4d02ec2470365a3ac.tar.xz wireguard-openbsd-1cb66ada17adf0954eaadba4d02ec2470365a3ac.zip | |
Import LLVM 4.0.0 release including clang and lld.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 48d8b94af15..200775756d3 100644 --- a/gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/gnu/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -4996,8 +4996,12 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, NamedDecl *Result = nullptr; // FIXME: If the name is a dependent name, this lookup won't necessarily // find it. Does that ever matter? - if (D->getDeclName()) { - DeclContext::lookup_result Found = ParentDC->lookup(D->getDeclName()); + if (auto Name = D->getDeclName()) { + DeclarationNameInfo NameInfo(Name, D->getLocation()); + Name = SubstDeclarationNameInfo(NameInfo, TemplateArgs).getName(); + if (!Name) + return nullptr; + DeclContext::lookup_result Found = ParentDC->lookup(Name); Result = findInstantiationOf(Context, D, Found.begin(), Found.end()); } else { // Since we don't have a name for the entity we're looking for, |
