Point the caret at the error for the 'expected namespace name' diagnostic in
a namespace alias declaration. llvm-svn: 154138
This commit is contained in:
parent
cb5b585cca
commit
a974688d35
|
@ -6742,7 +6742,7 @@ Decl *Sema::ActOnNamespaceAliasDef(Scope *S,
|
|||
|
||||
if (R.empty()) {
|
||||
if (!TryNamespaceTypoCorrection(*this, R, S, SS, IdentLoc, Ident)) {
|
||||
Diag(NamespaceLoc, diag::err_expected_namespace_name) << SS.getRange();
|
||||
Diag(IdentLoc, diag::err_expected_namespace_name) << SS.getRange();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,13 @@ namespace C { } // expected-note {{previous definition is here}}
|
|||
namespace C = N; // expected-error {{redefinition of 'C'}}
|
||||
|
||||
int i;
|
||||
namespace D = i; // expected-error {{expected namespace name}}
|
||||
namespace D =
|
||||
i; // expected-error {{expected namespace name}}
|
||||
|
||||
namespace E = N::Foo; // expected-error {{expected namespace name}}
|
||||
namespace E1 = N::
|
||||
Foo; // expected-error {{expected namespace name}}
|
||||
namespace E2 = N::
|
||||
X; // expected-error {{expected namespace name}}
|
||||
|
||||
namespace F {
|
||||
namespace A { namespace B { } } // expected-note {{candidate found by name lookup is 'F::A::B'}}
|
||||
|
|
Loading…
Reference in New Issue