diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Sema/init.c | 3 | ||||
-rw-r--r-- | clang/test/SemaCXX/invalid-member-expr.cpp | 18 |
2 files changed, 20 insertions, 1 deletions
diff --git a/clang/test/Sema/init.c b/clang/test/Sema/init.c index c2712480c61..b9867cf5027 100644 --- a/clang/test/Sema/init.c +++ b/clang/test/Sema/init.c @@ -75,7 +75,8 @@ int sym_fw1a_scr[] = { }; // PR3001 -struct s1 s2 = { +struct s1 s2 = { // expected-error {{variable has incomplete type 'struct s1'}} \ + // expected-note {{forward declaration of 'struct s1'}} .a = sizeof(struct s3), // expected-error {{invalid application of 'sizeof'}} \ // expected-note{{forward declaration of 'struct s3'}} .b = bogus // expected-error {{use of undeclared identifier 'bogus'}} diff --git a/clang/test/SemaCXX/invalid-member-expr.cpp b/clang/test/SemaCXX/invalid-member-expr.cpp index 7b17afbf818..7307a47f828 100644 --- a/clang/test/SemaCXX/invalid-member-expr.cpp +++ b/clang/test/SemaCXX/invalid-member-expr.cpp @@ -19,3 +19,21 @@ void test2() { x->operator; // expected-error{{missing type specifier after 'operator'}} x->operator typedef; // expected-error{{missing type specifier after 'operator'}} } + +// PR6327 +namespace test3 { + template <class A, class B> struct pair {}; + + void test0() { + pair<int, int> z = minmax({}); // expected-error {{expected expression}} + } + + struct string { + class iterator {}; + }; + + void test1() { + string s; + string::iterator i = s.foo(); // expected-error {{no member named 'foo'}} + } +} |