diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-19 04:25:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-19 04:25:59 +0000 |
commit | 975e6d0ccde80eee8c670d2d649da1e13de99b42 (patch) | |
tree | 8d95d36721cc8b0c2227d45ef66eea014e78834b /clang/test | |
parent | 183539102563b85e9421d0fc5c3a650a20887840 (diff) | |
download | bcm5719-llvm-975e6d0ccde80eee8c670d2d649da1e13de99b42.tar.gz bcm5719-llvm-975e6d0ccde80eee8c670d2d649da1e13de99b42.zip |
Print the context of tag types as part of pretty-printing, e.g.,
struct N::M::foo
llvm-svn: 67284
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaCXX/elaborated-type-specifier.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/enum.cpp | 4 | ||||
-rw-r--r-- | clang/test/SemaCXX/qualified-names-diag.cpp | 8 | ||||
-rw-r--r-- | clang/test/SemaTemplate/class-template-id-2.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaTemplate/qualified-names-diag.cpp | 2 |
5 files changed, 8 insertions, 10 deletions
diff --git a/clang/test/SemaCXX/elaborated-type-specifier.cpp b/clang/test/SemaCXX/elaborated-type-specifier.cpp index b9ba5087896..fe4e210814c 100644 --- a/clang/test/SemaCXX/elaborated-type-specifier.cpp +++ b/clang/test/SemaCXX/elaborated-type-specifier.cpp @@ -27,7 +27,7 @@ namespace NS { void test_X_elab(NS::X x) { struct S4 *s4 = 0; - x.test_elab2(s4); // expected-error{{incompatible type passing 'struct S4 *', expected 'struct S4 *'}} + x.test_elab2(s4); // expected-error{{incompatible type passing 'struct S4 *', expected 'struct NS::S4 *'}} } namespace NS { diff --git a/clang/test/SemaCXX/enum.cpp b/clang/test/SemaCXX/enum.cpp index c7748c31ba0..156dfd62088 100644 --- a/clang/test/SemaCXX/enum.cpp +++ b/clang/test/SemaCXX/enum.cpp @@ -32,9 +32,7 @@ struct s1 { enum e1 { YES, NO }; static enum e1 badfunc(struct s1 *q) { - // FIXME: the message below should probably give context information - // in those types. - return q->bar(); // expected-error{{incompatible type returning 'enum e1', expected 'enum e1'}} + return q->bar(); // expected-error{{incompatible type returning 'enum s1::e1', expected 'enum e1'}} } enum e2; // expected-error{{ISO C++ forbids forward references to 'enum' types}} diff --git a/clang/test/SemaCXX/qualified-names-diag.cpp b/clang/test/SemaCXX/qualified-names-diag.cpp index c3bd47f9e5c..cb82f3189c7 100644 --- a/clang/test/SemaCXX/qualified-names-diag.cpp +++ b/clang/test/SemaCXX/qualified-names-diag.cpp @@ -16,17 +16,17 @@ namespace foo { namespace bar { typedef int y; - struct incomplete; // expected-note{{forward declaration of 'struct incomplete'}} + struct incomplete; // expected-note{{forward declaration of 'struct bar::incomplete'}} } void test() { foo::wibble::x a; ::bar::y b; - a + b; // expected-error{{invalid operands to binary expression ('foo::wibble::x' (aka 'struct x') and '::bar::y' (aka 'int'))}} + a + b; // expected-error{{invalid operands to binary expression ('foo::wibble::x' (aka 'struct foo::wibble::x') and '::bar::y' (aka 'int'))}} ::foo::wibble::bar::wonka::x::y c; - c + b; // expected-error{{invalid operands to binary expression ('::foo::wibble::bar::wonka::x::y' (aka 'struct y') and '::bar::y' (aka 'int'))}} + c + b; // expected-error{{invalid operands to binary expression ('::foo::wibble::bar::wonka::x::y' (aka 'struct foo::wibble::bar::wonka::x::y') and '::bar::y' (aka 'int'))}} - (void)sizeof(bar::incomplete); // expected-error{{invalid application of 'sizeof' to an incomplete type 'bar::incomplete' (aka 'struct incomplete')}} + (void)sizeof(bar::incomplete); // expected-error{{invalid application of 'sizeof' to an incomplete type 'bar::incomplete' (aka 'struct bar::incomplete')}} } int ::foo::wibble::bar::wonka::x::y::* ptrmem; diff --git a/clang/test/SemaTemplate/class-template-id-2.cpp b/clang/test/SemaTemplate/class-template-id-2.cpp index 5499c50a949..e77555f2f97 100644 --- a/clang/test/SemaTemplate/class-template-id-2.cpp +++ b/clang/test/SemaTemplate/class-template-id-2.cpp @@ -4,7 +4,7 @@ namespace N { template<> class A<int> { }; - template<> class A<float>; // expected-note{{forward declaration of 'class A<float>'}} + template<> class A<float>; // expected-note{{forward declaration of 'class N::A<float>'}} class B : public A<int> { }; } diff --git a/clang/test/SemaTemplate/qualified-names-diag.cpp b/clang/test/SemaTemplate/qualified-names-diag.cpp index 02bdf16b2ba..74e61bbb274 100644 --- a/clang/test/SemaTemplate/qualified-names-diag.cpp +++ b/clang/test/SemaTemplate/qualified-names-diag.cpp @@ -12,5 +12,5 @@ void test() { std::vector<INT> v1; vector<Real> v2; - v1 = v2; // expected-error{{incompatible type assigning 'vector<Real>' (aka 'class vector<float>'), expected 'std::vector<INT>' (aka 'class vector<int>')}} + v1 = v2; // expected-error{{incompatible type assigning 'vector<Real>' (aka 'class std::vector<float>'), expected 'std::vector<INT>' (aka 'class std::vector<int>')}} } |