// repeatedly where (and only where) multiple declarations are
// allowed.
//
- // That's in file contexts.
- if (CurContext->isFileContext())
+ // That's in non-member contexts.
+ if (!CurContext->getRedeclContext()->isRecord())
return false;
NestedNameSpecifier *Qual
template struct Derived<int>; // expected-note {{in instantiation of template class}}
}
-// PR8668: redeclarations are not okay in a function.
+// Redeclarations are okay in a function.
namespace test3 {
namespace N {
int f(int);
}
void g() {
- using N::f; // expected-note {{previous using declaration}}
- using N::f; // expected-error {{redeclaration of using decl}}
- using N::type; // expected-note {{previous using declaration}}
- using N::type; // expected-error {{redeclaration of using decl}}
- }
-
- void h() {
using N::f;
+ using N::f;
+ using N::type;
using N::type;
- {
- using N::f;
- using N::type;
- }
}
}