diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2926,8 +2926,8 @@ // Recovery AST still heavily relies on dependent-type machinery. Opts.RecoveryAST = Args.hasFlag(OPT_frecovery_ast, OPT_fno_recovery_ast, Opts.CPlusPlus); - Opts.RecoveryASTType = - Args.hasFlag(OPT_frecovery_ast_type, OPT_fno_recovery_ast_type, false); + Opts.RecoveryASTType = Args.hasFlag( + OPT_frecovery_ast_type, OPT_fno_recovery_ast_type, Opts.CPlusPlus); Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions); Opts.AccessControl = !Args.hasArg(OPT_fno_access_control); Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors); diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp --- a/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp @@ -67,7 +67,8 @@ // expected-note@-1 {{candidate function [with T = long long, U = int]}} static_assert(sizeof(f())); -// expected-error@-1 {{call to 'f' is ambiguous}} +// expected-error@-1 {{call to 'f' is ambiguous}} \ + expected-error@-1 {{invalid application of 'sizeof' to an incomplete type 'void'}} template concept C3 = true; diff --git a/clang/test/SemaCXX/abstract.cpp b/clang/test/SemaCXX/abstract.cpp --- a/clang/test/SemaCXX/abstract.cpp +++ b/clang/test/SemaCXX/abstract.cpp @@ -279,10 +279,11 @@ virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}} }; - void foo( C& c ) {} + void foo( C& c ) {} // expected-note {{candidate function not viable: expects an l-value for 1st argument}} void bar( void ) { - foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}} + foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}} \ + expected-error {{no matching function for call to 'foo'}} } } diff --git a/clang/test/SemaCXX/decl-expr-ambiguity.cpp b/clang/test/SemaCXX/decl-expr-ambiguity.cpp --- a/clang/test/SemaCXX/decl-expr-ambiguity.cpp +++ b/clang/test/SemaCXX/decl-expr-ambiguity.cpp @@ -12,7 +12,7 @@ T(a)->m = 7; int(a)++; // expected-error {{assignment to cast is illegal}} __extension__ int(a)++; // expected-error {{assignment to cast is illegal}} - __typeof(int)(a,5)< struct C { static const int n = f(T()); // expected-error {{no matching function}}