diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-02-09 06:54:23 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-02-09 06:54:23 +0000 |
commit | 6cab596218f9b16f32153ccba57ac6fec9984bed (patch) | |
tree | 7bf905e246ea08a2a20db67bf6239f4f99d9561a /clang/test/SemaCXX/constructor-initializer.cpp | |
parent | 158ba130eec9997716b22bdf2bfe476d9f73104a (diff) | |
download | bcm5719-llvm-6cab596218f9b16f32153ccba57ac6fec9984bed.tar.gz bcm5719-llvm-6cab596218f9b16f32153ccba57ac6fec9984bed.zip |
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
Diffstat (limited to 'clang/test/SemaCXX/constructor-initializer.cpp')
-rw-r--r-- | clang/test/SemaCXX/constructor-initializer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp index 697f718eabb..81dc19ea6df 100644 --- a/clang/test/SemaCXX/constructor-initializer.cpp +++ b/clang/test/SemaCXX/constructor-initializer.cpp @@ -94,7 +94,7 @@ struct Current : Derived { Derived::Base1(), // expected-error {{type 'Derived::Base1' is not a direct or virtual base of 'Current'}} Derived::V(), ::NonExisting(), // expected-error {{member initializer 'NonExisting' does not name a non-static data member or}} - INT::NonExisting() {} // expected-error {{expected a class or namespace}} \ + INT::NonExisting() {} // expected-error {{'INT' (aka 'int') is not a class, namespace, or scoped enumeration}} \ // expected-error {{member initializer 'NonExisting' does not name a non-static data member or}} }; |