Index: cfe/trunk/lib/Sema/SemaExprCXX.cpp =================================================================== --- cfe/trunk/lib/Sema/SemaExprCXX.cpp +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp @@ -90,7 +90,7 @@ // When naming a constructor as a member of a dependent context (eg, in a // friend declaration or an inherited constructor declaration), form an // unresolved "typename" type. - if (CurClass->isDependentContext() && !EnteringContext) { + if (CurClass->isDependentContext() && !EnteringContext && SS.getScopeRep()) { QualType T = Context.getDependentNameType(ETK_None, SS.getScopeRep(), &II); return ParsedType::make(T); } Index: cfe/trunk/test/SemaCXX/using-decl-1.cpp =================================================================== --- cfe/trunk/test/SemaCXX/using-decl-1.cpp +++ cfe/trunk/test/SemaCXX/using-decl-1.cpp @@ -396,3 +396,10 @@ using N::Y; using N::Z; } + +// expected-error@+5 {{requires a qualified name}} +// expected-error@+4 {{expected ';'}} +// expected-error@+3 {{expected '}'}} +// expected-note@+2 {{to match this '{'}} +// expected-error@+1 {{expected ';'}} +template struct S { using S \ No newline at end of file