summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/IdentifierResolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/IdentifierResolver.cpp')
-rw-r--r--clang/lib/Sema/IdentifierResolver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/IdentifierResolver.cpp b/clang/lib/Sema/IdentifierResolver.cpp
index e97de738178..8375720e55c 100644
--- a/clang/lib/Sema/IdentifierResolver.cpp
+++ b/clang/lib/Sema/IdentifierResolver.cpp
@@ -57,7 +57,9 @@ DeclContext *IdentifierResolver::LookupContext::getContext(Decl *D) {
if (EnumConstantDecl *EnumD = dyn_cast<EnumConstantDecl>(D)) {
Ctx = EnumD->getDeclContext()->getParent();
} else if (ScopedDecl *SD = dyn_cast<ScopedDecl>(D))
- Ctx = SD->getDeclContext();
+ Ctx = SD->getDeclContext();
+ else if (OverloadedFunctionDecl *Ovl = dyn_cast<OverloadedFunctionDecl>(D))
+ Ctx = Ovl->getDeclContext();
else
return TUCtx();
OpenPOWER on IntegriCloud