diff options
Diffstat (limited to 'clang/test/Parser')
| -rw-r--r-- | clang/test/Parser/cxx-nested-name-spec.cpp | 10 | ||||
| -rw-r--r-- | clang/test/Parser/lambda-misplaced-capture-default.cpp | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-nested-name-spec.cpp b/clang/test/Parser/cxx-nested-name-spec.cpp new file mode 100644 index 0000000..3a551a4 --- /dev/null +++ b/clang/test/Parser/cxx-nested-name-spec.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +namespace a { b c ( a:c:: +// expected-error@-1 {{unknown type name 'b'}} +// expected-error@-2 {{unexpected ':' in nested name specifier; did you mean '::'?}} +// expected-error@-3 {{no member named 'c' in namespace 'a'}} +// expected-error@-4 {{expected ';' after top level declarator}} +// expected-note@-5 {{to match this '{'}} +// expected-error@+1 {{expected unqualified-id}} \ +// expected-error@+1 {{expected '}'}} diff --git a/clang/test/Parser/lambda-misplaced-capture-default.cpp b/clang/test/Parser/lambda-misplaced-capture-default.cpp index d65b875..4f5bd6d 100644 --- a/clang/test/Parser/lambda-misplaced-capture-default.cpp +++ b/clang/test/Parser/lambda-misplaced-capture-default.cpp @@ -36,3 +36,12 @@ template <typename... Args> void Test(Args... args) { [... xs = &args, &] {}; // expected-error {{capture default must be first}} } } // namespace misplaced_capture_default_pack + +namespace GH163498 { +struct S { + template <class T> S(T) {} +}; +void t() { + S s{[a(42), &] {}}; // expected-error {{capture default must be first}} +} +} |
