From 4b718ee691f0f168021286f7ee75f52224cb8a1c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 6 May 2010 23:31:27 +0000 Subject: It turns out that we should be allowing redeclarations within function scope. Thanks to Steven Watanabe for correcting me. llvm-svn: 103210 --- clang/lib/Sema/SemaDeclCXX.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 23b3601f09a..e32a308af58 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -3880,8 +3880,9 @@ bool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc, // A using-declaration is a declaration and can therefore be used // repeatedly where (and only where) multiple declarations are // allowed. - // That's only in file contexts. - if (CurContext->getLookupContext()->isFileContext()) + // + // That's in non-member contexts. + if (!CurContext->getLookupContext()->isRecord()) return false; NestedNameSpecifier *Qual -- cgit v1.2.3