diff --git a/clang/test/OpenMP/target_update_from_messages.cpp b/clang/test/OpenMP/target_update_from_messages.cpp --- a/clang/test/OpenMP/target_update_from_messages.cpp +++ b/clang/test/OpenMP/target_update_from_messages.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le50 -fopenmp -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le50 -frecovery-ast -fopenmp -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized void foo() { } @@ -74,7 +74,7 @@ #pragma omp target update from(*(this->S->i+this->S->s6[0].pp)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update from(*(a+this->ptr)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update from(*(*(this->ptr)+a+this->ptr)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} -#pragma omp target update from(*(this+this)) // expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} expected-error {{invalid operands to binary expression ('S8 *' and 'S8 *')}} +#pragma omp target update from(*(this+this)) // expected-error {{invalid operands to binary expression ('S8 *' and 'S8 *')}} } }; @@ -198,8 +198,8 @@ #pragma omp target update from(**(-(*offset)+BB+*m)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update from(**(*(*(&offset))+BB-*m)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update from(*(x+*(y+*(**BB+BBB)+s7.i))) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} -#pragma omp target update from(*(m+(m))) // expected-error {{invalid operands to binary expression ('int *' and 'int *')}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} -#pragma omp target update from(*(1+y+y)) // expected-error {{indirection requires pointer operand ('int' invalid)}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update from(*(m+(m))) // expected-error {{invalid operands to binary expression ('int *' and 'int *')}} +#pragma omp target update from(*(1+y+y)) // expected-error {{indirection requires pointer operand ('int' invalid)}} #pragma omp target data map(to: s7.i) { #pragma omp target update from(s7.x) diff --git a/clang/test/OpenMP/target_update_to_messages.cpp b/clang/test/OpenMP/target_update_to_messages.cpp --- a/clang/test/OpenMP/target_update_to_messages.cpp +++ b/clang/test/OpenMP/target_update_to_messages.cpp @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le50 -fopenmp -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized - -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized -// RUN: %clang_cc1 -verify=expected,le50 -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le50 -frecovery-ast -fopenmp -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized + +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp-simd -fopenmp-version=40 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le45 -frecovery-ast -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le50 -frecovery-ast -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 %s -Wno-openmp-mapping -Wuninitialized void foo() { } @@ -77,7 +77,7 @@ #pragma omp target update to(*(this->S->i+this->S->s6[0].pp)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update to(*(a+this->ptr)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update to(*(*(this->ptr)+a+this->ptr)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} -#pragma omp target update to(*(this+this)) // expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} expected-error {{invalid operands to binary expression ('S8 *' and 'S8 *')}} +#pragma omp target update to(*(this+this)) // expected-error {{invalid operands to binary expression ('S8 *' and 'S8 *')}} {} } }; @@ -205,8 +205,8 @@ #pragma omp target update to(**(*offset+BB+*m)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update to(**(*(*(&offset))+BB+*m)) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} #pragma omp target update to(*(x+*(y+*(**BB+BBB)+s7.i))) // le45-error {{expected expression containing only member accesses and/or array sections based on named variables}} le45-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} -#pragma omp target update to(*(m+(m))) // expected-error {{invalid operands to binary expression ('int *' and 'int *')}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} -#pragma omp target update to(*(1+y+y)) // expected-error {{indirection requires pointer operand ('int' invalid)}} expected-error {{expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'}} +#pragma omp target update to(*(m+(m))) // expected-error {{invalid operands to binary expression ('int *' and 'int *')}} +#pragma omp target update to(*(1+y+y)) // expected-error {{indirection requires pointer operand ('int' invalid)}} {} return tmain(argc)+tmain(argc); // expected-note {{in instantiation of function template specialization 'tmain' requested here}} expected-note {{in instantiation of function template specialization 'tmain' requested here}} } diff --git a/clang/test/Parser/objcxx0x-lambda-expressions.mm b/clang/test/Parser/objcxx0x-lambda-expressions.mm --- a/clang/test/Parser/objcxx0x-lambda-expressions.mm +++ b/clang/test/Parser/objcxx0x-lambda-expressions.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused-value -Wno-c++1y-extensions -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -frecovery-ast -verify -Wno-unused-value -Wno-c++1y-extensions -std=c++11 %s class C { id get(int); @@ -11,7 +11,8 @@ []; // expected-error {{expected body of lambda expression}} [=,foo+] {}; // expected-error {{expected ',' or ']' in lambda capture list}} - [&this] {}; // expected-error {{cannot take the address of an rvalue of type 'C *'}} + [&this] {}; // expected-error {{cannot take the address of an rvalue of type 'C *'}} \ + // expected-error {{expected identifier}} [] {}; [=] (int i) {}; [&] (int) mutable -> void {}; @@ -24,7 +25,8 @@ [foo{bar}] () {}; [foo = {bar}] () {}; // expected-error {{}} - [foo(bar) baz] () {}; // expected-error {{called object type 'int' is not a function}} + [foo(bar) baz] () {}; // expected-error {{called object type 'int' is not a function}} \ + // expected-error {{expected ';'}} [foo(bar), baz] () {}; // ok [foo = bar baz]; // expected-warning {{receiver type 'int'}} expected-warning {{instance method '-baz'}} diff --git a/clang/test/Parser/objcxx11-invalid-lambda.cpp b/clang/test/Parser/objcxx11-invalid-lambda.cpp --- a/clang/test/Parser/objcxx11-invalid-lambda.cpp +++ b/clang/test/Parser/objcxx11-invalid-lambda.cpp @@ -1,10 +1,11 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -x objective-c++ -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -frecovery-ast -verify -x objective-c++ -std=c++11 %s -void foo() { // expected-note {{to match this '{'}} +void foo() { int bar; auto baz = [ - bar( // expected-note {{to match this '('}} expected-note {{to match this '('}} + bar( // expected-note 2{{to match this '('}}\ + // expected-warning {{captures are a C++14 extension}} foo_undeclared() // expected-error{{use of undeclared identifier 'foo_undeclared'}} /* ) */ - ] () { }; // expected-error{{expected ')'}} -} // expected-error{{expected ')'}} expected-error {{expected ',' or ']'}} expected-error{{expected ';' at end of declaration}} expected-error{{expected '}'}} + ] () { }; // expected-error 2{{expected ')'}} +} \ No newline at end of file diff --git a/clang/test/SemaCXX/cast-conversion.cpp b/clang/test/SemaCXX/cast-conversion.cpp --- a/clang/test/SemaCXX/cast-conversion.cpp +++ b/clang/test/SemaCXX/cast-conversion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown -verify %s -std=c++11 +// RUN: %clang_cc1 -fsyntax-only -frecovery-ast -triple x86_64-unknown-unknown -verify %s -std=c++11 -Wno-unused struct R { R(int); diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp --- a/clang/test/SemaCXX/constructor-initializer.cpp +++ b/clang/test/SemaCXX/constructor-initializer.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify %s -// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++98 %s -// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++11 %s +// RUN: %clang_cc1 -Wreorder -frecovery-ast -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wreorder -frecovery-ast -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -Wreorder -frecovery-ast -fsyntax-only -verify -std=c++11 %s class A { int m; @@ -250,7 +250,7 @@ B(const String& s, int e=0) // expected-error {{unknown type name}} : A(e), m_String(s) , m_ErrorStr(__null) {} // expected-error {{no matching constructor}} expected-error {{does not name}} B(const B& e) - : A(e), m_String(e.m_String), m_ErrorStr(__null) { // expected-error {{does not name}} \ + : A(e), m_String(e.m_String), m_ErrorStr(__null) { // expected-error 2{{does not name}} \ // expected-error {{no member named 'm_String' in 'test3::B'}} } }; diff --git a/clang/test/SemaCXX/cxx1z-copy-omission.cpp b/clang/test/SemaCXX/cxx1z-copy-omission.cpp --- a/clang/test/SemaCXX/cxx1z-copy-omission.cpp +++ b/clang/test/SemaCXX/cxx1z-copy-omission.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++1z -verify %s +// RUN: %clang_cc1 -std=c++1z -frecovery-ast -verify -Wno-unused %s struct Noncopyable { Noncopyable(); @@ -107,8 +107,10 @@ sizeof(make_indestructible()); // expected-error {{deleted}} sizeof(make_incomplete()); // expected-error {{incomplete}} typeid(Indestructible{}); // expected-error {{deleted}} - typeid(make_indestructible()); // expected-error {{deleted}} - typeid(make_incomplete()); // expected-error {{incomplete}} + typeid(make_indestructible()); // expected-error {{deleted}} \ + // expected-error {{need to include }} + typeid(make_incomplete()); // expected-error {{incomplete}} \ + // expected-error {{need to include }} // FIXME: The first two cases here are now also valid in C++17 onwards. using I = decltype(Indestructible()); // expected-error {{deleted}} diff --git a/clang/test/SemaCXX/decltype-crash.cpp b/clang/test/SemaCXX/decltype-crash.cpp --- a/clang/test/SemaCXX/decltype-crash.cpp +++ b/clang/test/SemaCXX/decltype-crash.cpp @@ -1,7 +1,10 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -frecovery-ast -verify -Wc++11-compat -std=c++98 %s int& a(); void f() { - decltype(a()) c; // expected-warning {{'decltype' is a keyword in C++11}} expected-error {{use of undeclared identifier 'decltype'}} + decltype(a()) c; // expected-warning {{'decltype' is a keyword in C++11}} \ + // expected-error {{use of undeclared identifier 'decltype'}} \ + // expected-error {{expected ';' after expression}} \ + // expected-error {{use of undeclared identifier 'c'}} } diff --git a/clang/test/SemaCXX/varargs.cpp b/clang/test/SemaCXX/varargs.cpp --- a/clang/test/SemaCXX/varargs.cpp +++ b/clang/test/SemaCXX/varargs.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++03 -verify %s -// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++03 -frecovery-ast -verify %s +// RUN: %clang_cc1 -std=c++11 -frecovery-ast -verify %s __builtin_va_list ap; @@ -22,7 +22,8 @@ // default ctor. void record_context(int a, ...) { struct Foo { - // expected-error@+1 {{'va_start' cannot be used outside a function}} + // expected-error@+2 {{'va_start' cannot be used outside a function}} + // expected-error@+1 {{default argument references parameter 'a'}} void meth(int a, int b = (__builtin_va_start(ap, a), 0)) {} }; } diff --git a/clang/test/SemaOpenCLCXX/address-space-references.cl b/clang/test/SemaOpenCLCXX/address-space-references.cl --- a/clang/test/SemaOpenCLCXX/address-space-references.cl +++ b/clang/test/SemaOpenCLCXX/address-space-references.cl @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -pedantic -verify -fsyntax-only +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -frecovery-ast -cl-std=clc++ -pedantic -verify -fsyntax-only __global const int& f(__global float &ref) { return ref; // expected-error{{reference of type 'const __global int &' cannot bind to a temporary object because of address space mismatch}} @@ -11,7 +11,7 @@ int bar(const unsigned int &i); void foo() { - bar(1) // expected-error{{binding reference of type 'const __global unsigned int' to value of type 'int' changes address space}} + bar(1); // expected-error{{binding reference of type 'const __global unsigned int' to value of type 'int' changes address space}} } // Test addr space conversion with nested pointers diff --git a/clang/test/SemaTemplate/instantiate-init.cpp b/clang/test/SemaTemplate/instantiate-init.cpp --- a/clang/test/SemaTemplate/instantiate-init.cpp +++ b/clang/test/SemaTemplate/instantiate-init.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -frecovery-ast -verify -std=c++11 %s struct X0 { // expected-note 8{{candidate}} X0(int*, float*); // expected-note 4{{candidate}} @@ -100,7 +100,7 @@ integral_c<1> ic1 = array_lengthof(Description::data); (void)sizeof(array_lengthof(Description::data)); - sizeof(array_lengthof( // expected-error{{no matching function for call to 'array_lengthof'}} + (void)sizeof(array_lengthof( // expected-error{{no matching function for call to 'array_lengthof'}} Description::data // expected-note{{in instantiation of static data member 'PR7985::Description::data' requested here}} ));