diff options
author | John McCall <rjmccall@apple.com> | 2010-03-31 02:13:20 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-03-31 02:13:20 +0000 |
commit | 7727acf243ee61c0757d86c95b69dbee56a3d898 (patch) | |
tree | 7d0e27420e5bf67084dfceef74710da60a4d0171 /test/SemaCXX/invalid-member-expr.cpp | |
parent | 32daa4223ccb2c0afe5fbe151c6eb1ab64816957 (diff) |
Fix PR6327: restore invariants when there's a parse error in an initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/invalid-member-expr.cpp')
-rw-r--r-- | test/SemaCXX/invalid-member-expr.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/invalid-member-expr.cpp b/test/SemaCXX/invalid-member-expr.cpp index 7b17afbf81..7307a47f82 100644 --- a/test/SemaCXX/invalid-member-expr.cpp +++ b/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'}} + } +} |