Improve diagnostic for using non-class/namespace/scoped enum in a nested name specifier.
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 9 Feb 2014 06:54:23 +0000 (06:54 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 9 Feb 2014 06:54:23 +0000 (06:54 +0000)
commit6cab596218f9b16f32153ccba57ac6fec9984bed
tree7bf905e246ea08a2a20db67bf6239f4f99d9561a
parent158ba130eec9997716b22bdf2bfe476d9f73104a
Improve diagnostic for using non-class/namespace/scoped enum in a nested name specifier.

Rather than simply saying "X is not a class or namespace", clarify what
X is by providing the aka type in the case where X is a type, or
pointing to the named declaration if there's an unambiguous one to refer
to. In the ambiguous case, the ambiguities are already enumerated
(though could be clarified by describing what kind of entities they are)

Included a few FIXMEs in tests where some further improvements could be
made.

llvm-svn: 201038
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaCXXScopeSpec.cpp
clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp
clang/test/CXX/temp/temp.res/temp.local/p3.cpp
clang/test/SemaCXX/constructor-initializer.cpp
clang/test/SemaCXX/member-pointer.cpp
clang/test/SemaCXX/nested-name-spec.cpp
clang/test/SemaObjCXX/propert-dot-error.mm