aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-21 07:41:49 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-21 07:41:49 +0000
commit6fb0729241ab204e9bed9a5ff2f5bd396db111d4 (patch)
treee116bed83a112cc0dd55e0ecacbda4d311ccedfe /lib
parent14af91a38c8cf89f0a5e1835d7d8e0fa220e17a9 (diff)
When checking a using declaration, make sure that the context we're
looking in is complete. Fixes PR8756. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index d257531565..0021c79823 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -4052,6 +4052,10 @@ bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc,
return true;
}
+ if (!NamedContext->isDependentContext() &&
+ RequireCompleteDeclContext(const_cast<CXXScopeSpec&>(SS), NamedContext))
+ return true;
+
if (getLangOptions().CPlusPlus0x) {
// C++0x [namespace.udecl]p3:
// In a using-declaration used as a member-declaration, the