diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-05-06 23:31:27 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-05-06 23:31:27 +0000 |
| commit | 4b718ee691f0f168021286f7ee75f52224cb8a1c (patch) | |
| tree | d02eabe063d6924b5e861e7065480d9fa514ce81 /clang/lib | |
| parent | d8bb3aff76145e391a0df4be7591021d083bc258 (diff) | |
| download | bcm5719-llvm-4b718ee691f0f168021286f7ee75f52224cb8a1c.tar.gz bcm5719-llvm-4b718ee691f0f168021286f7ee75f52224cb8a1c.zip | |
It turns out that we should be allowing redeclarations within function
scope. Thanks to Steven Watanabe for correcting me.
llvm-svn: 103210
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 |

