[llvm-branch-commits] [clang] b1444ed - [AST] Build recovery expression by default for all language.

Haojian Wu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 23 02:25:26 PST 2020


Author: Haojian Wu
Date: 2020-11-23T11:08:28+01:00
New Revision: b1444edbf41c1fe9f7e676df6e873e9c9318283e

URL: https://github.com/llvm/llvm-project/commit/b1444edbf41c1fe9f7e676df6e873e9c9318283e
DIFF: https://github.com/llvm/llvm-project/commit/b1444edbf41c1fe9f7e676df6e873e9c9318283e.diff

LOG: [AST] Build recovery expression by default for all language.

The dependency mechanism for C has been implemented, and we have rolled out
this to all internal users, didn't see crashy issues, we consider it is stable
enough.

Differential Revision: https://reviews.llvm.org/D89046

Added: 
    

Modified: 
    clang/include/clang/AST/Expr.h
    clang/include/clang/Basic/LangOptions.def
    clang/lib/Frontend/CompilerInvocation.cpp
    clang/test/CodeGen/SystemZ/builtins-systemz-zvector-error.c
    clang/test/CodeGen/SystemZ/builtins-systemz-zvector2-error.c
    clang/test/CodeGen/SystemZ/builtins-systemz-zvector3-error.c
    clang/test/CodeGen/builtins-ppc-error.c
    clang/test/Index/complete-switch.c
    clang/test/OpenMP/begin_declare_variant_messages.c
    clang/test/OpenMP/declare_variant_messages.c
    clang/test/Parser/objc-foreach-syntax.m
    clang/test/Sema/__try.c
    clang/test/Sema/enum.c
    clang/test/Sema/typo-correction.c

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index 11b05ce7a5f5e..3ea2817f1926c 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -6330,9 +6330,6 @@ class TypoExpr : public Expr {
 ///
 /// One can also reliably suppress all bogus errors on expressions containing
 /// recovery expressions by examining results of Expr::containsErrors().
-///
-/// FIXME: RecoveryExpr is currently generated by default in C++ mode only, as
-/// dependence isn't handled properly on several C-only codepaths.
 class RecoveryExpr final : public Expr,
                            private llvm::TrailingObjects<RecoveryExpr, Expr *> {
 public:

diff  --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def
index 9c573b43049c7..e4113789f07ce 100644
--- a/clang/include/clang/Basic/LangOptions.def
+++ b/clang/include/clang/Basic/LangOptions.def
@@ -148,8 +148,8 @@ LANGOPT(RelaxedTemplateTemplateArgs, 1, 0, "C++17 relaxed matching of template t
 
 LANGOPT(DoubleSquareBracketAttributes, 1, 0, "'[[]]' attributes extension for all language standard modes")
 
-COMPATIBLE_LANGOPT(RecoveryAST, 1, 0, "Preserve expressions in AST when encountering errors")
-COMPATIBLE_LANGOPT(RecoveryASTType, 1, 0, "Preserve the type in recovery expressions")
+COMPATIBLE_LANGOPT(RecoveryAST, 1, 1, "Preserve expressions in AST when encountering errors")
+COMPATIBLE_LANGOPT(RecoveryASTType, 1, 1, "Preserve the type in recovery expressions")
 
 BENIGN_LANGOPT(ThreadsafeStatics , 1, 1, "thread-safe static initializers")
 LANGOPT(POSIXThreads      , 1, 0, "POSIX thread support")

diff  --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index f6753b5b91a03..35025a9829ef8 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3020,11 +3020,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
       !Args.hasArg(OPT_fno_concept_satisfaction_caching);
   if (Args.hasArg(OPT_fconcepts_ts))
     Diags.Report(diag::warn_fe_concepts_ts_flag);
-  // 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, Opts.CPlusPlus);
+  Opts.RecoveryAST = Args.hasFlag(OPT_frecovery_ast, OPT_fno_recovery_ast);
+  Opts.RecoveryASTType =
+      Args.hasFlag(OPT_frecovery_ast_type, OPT_fno_recovery_ast_type);
   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/CodeGen/SystemZ/builtins-systemz-zvector-error.c b/clang/test/CodeGen/SystemZ/builtins-systemz-zvector-error.c
index 5fdcb4061850f..77e90b5ad4b84 100644
--- a/clang/test/CodeGen/SystemZ/builtins-systemz-zvector-error.c
+++ b/clang/test/CodeGen/SystemZ/builtins-systemz-zvector-error.c
@@ -67,7 +67,7 @@ void test_core(void) {
   len = __lcbb(cptr, 8192);  // expected-error {{no matching function}}
                              // expected-note at vecintrin.h:* {{must be a constant power of 2 from 64 to 4096}}
 
-  vsl = vec_permi(vsl, vsl, idx); // expected-error {{no matching function}}
+  vsl = vec_permi(vsl, vsl, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vpdi' must be a constant integer}}
                                   // expected-note at vecintrin.h:* 3 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
   vsl = vec_permi(vsl, vsl, -1);  // expected-error {{no matching function}}
@@ -76,7 +76,7 @@ void test_core(void) {
   vsl = vec_permi(vsl, vsl, 4);   // expected-error {{no matching function}}
                                   // expected-note at vecintrin.h:* 3 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vul = vec_permi(vul, vul, idx); // expected-error {{no matching function}}
+  vul = vec_permi(vul, vul, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vpdi' must be a constant integer}}
                                   // expected-note at vecintrin.h:* 2 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
   vul = vec_permi(vul, vul, -1);  // expected-error {{no matching function}}
@@ -85,7 +85,7 @@ void test_core(void) {
   vul = vec_permi(vul, vul, 4);   // expected-error {{no matching function}}
                                   // expected-note at vecintrin.h:* 2 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
-  vbl = vec_permi(vbl, vbl, idx); // expected-error {{no matching function}}
+  vbl = vec_permi(vbl, vbl, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vpdi' must be a constant integer}}
                                   // expected-note at vecintrin.h:* 2 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
   vbl = vec_permi(vbl, vbl, -1);  // expected-error {{no matching function}}
@@ -94,7 +94,7 @@ void test_core(void) {
   vbl = vec_permi(vbl, vbl, 4);   // expected-error {{no matching function}}
                                   // expected-note at vecintrin.h:* 2 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
-  vd = vec_permi(vd, vd, idx);    // expected-error {{no matching function}}
+  vd = vec_permi(vd, vd, idx);    // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vpdi' must be a constant integer}}
                                   // expected-note at vecintrin.h:* 3 {{candidate function not viable}}
                                   // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
   vd = vec_permi(vd, vd, -1);     // expected-error {{no matching function}}
@@ -232,28 +232,28 @@ void test_core(void) {
                                              // expected-note at vecintrin.h:* 6 {{candidate function not viable}}
                                              // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
 
-  vsc = vec_load_bndry(cptrsc, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vsc = vec_load_bndry(cptrsc, 200);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vsc = vec_load_bndry(cptrsc, 32);    // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vsc = vec_load_bndry(cptrsc, 8192);  // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vuc = vec_load_bndry(cptruc, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vss = vec_load_bndry(cptrss, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vus = vec_load_bndry(cptrus, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vsi = vec_load_bndry(cptrsi, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vui = vec_load_bndry(cptrui, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vsl = vec_load_bndry(cptrsl, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
-  vul = vec_load_bndry(cptrul, idx);   // expected-error {{no matching function}}
-                                       // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vsc = vec_load_bndry(cptrsc, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vsc = vec_load_bndry(cptrsc, 200);  // expected-error {{no matching function}} expected-error {{argument value -1 is outside the valid range [0, 15]}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vsc = vec_load_bndry(cptrsc, 32);   // expected-error {{no matching function}} expected-error {{argument value -1 is outside the valid range [0, 15]}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vsc = vec_load_bndry(cptrsc, 8192); // expected-error {{no matching function}} expected-error {{argument value -1 is outside the valid range [0, 15]}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vuc = vec_load_bndry(cptruc, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vss = vec_load_bndry(cptrss, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vus = vec_load_bndry(cptrus, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vsi = vec_load_bndry(cptrsi, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vui = vec_load_bndry(cptrui, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vsl = vec_load_bndry(cptrsl, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
+  vul = vec_load_bndry(cptrul, idx);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vlbb' must be a constant integer}}
+                                      // expected-note at vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
 
   vuc = vec_genmask(idx);  // expected-error {{no matching function}}
                            // expected-note at vecintrin.h:* {{must be a constant integer}}
@@ -420,108 +420,140 @@ void test_core(void) {
 }
 
 void test_integer(void) {
-  vsc = vec_rl_mask(vsc, vuc, idx); // expected-error {{no matching function}}
+  vsc = vec_rl_mask(vsc, vuc, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vuc = vec_rl_mask(vuc, vuc, idx); // expected-error {{no matching function}}
+  vuc = vec_rl_mask(vuc, vuc, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vss = vec_rl_mask(vss, vus, idx); // expected-error {{no matching function}}
+  vss = vec_rl_mask(vss, vus, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vus = vec_rl_mask(vus, vus, idx); // expected-error {{no matching function}}
+  vus = vec_rl_mask(vus, vus, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vsi = vec_rl_mask(vsi, vui, idx); // expected-error {{no matching function}}
+  vsi = vec_rl_mask(vsi, vui, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vui = vec_rl_mask(vui, vui, idx); // expected-error {{no matching function}}
+  vui = vec_rl_mask(vui, vui, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vsl = vec_rl_mask(vsl, vul, idx); // expected-error {{no matching function}}
+  vsl = vec_rl_mask(vsl, vul, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
-  vul = vec_rl_mask(vul, vul, idx); // expected-error {{no matching function}}
+  vul = vec_rl_mask(vul, vul, idx); // expected-error {{no matching function}} \
+                                    // expected-error {{argument to '__builtin_s390_verimb' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimh' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimf' must be a constant integer}} \
+                                    // expected-error {{argument to '__builtin_s390_verimg' must be a constant integer}}
                                     // expected-note at vecintrin.h:* 7 {{candidate function not viable}}
                                     // expected-note at vecintrin.h:* 1 {{must be a constant integer}}
 
-  vsc = vec_sld(vsc, vsc, idx); // expected-error {{no matching function}}
+  vsc = vec_sld(vsc, vsc, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vsc = vec_sld(vsc, vsc, -1);  // expected-error {{no matching function}}
+  vsc = vec_sld(vsc, vsc, -1);  // expected-error {{no matching function}} expected-error {{argument value -1 is outside the valid range [0, 15]}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vsc = vec_sld(vsc, vsc, 16);  // expected-error {{no matching function}}
+  vsc = vec_sld(vsc, vsc, 16);  // expected-error {{no matching function}} expected-error {{argument value 16 is outside the valid range [0, 15]}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vuc = vec_sld(vuc, vuc, idx); // expected-error {{no matching function}}
+  vuc = vec_sld(vuc, vuc, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 11 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
-  vuc = vec_sld(vuc, vuc, -1);  // expected-error {{no matching function}}
+  vuc = vec_sld(vuc, vuc, -1);  // expected-error {{no matching function}} expected-error {{argument value -1 is outside the valid range [0, 15]}}
                                 // expected-note at vecintrin.h:* 11 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
-  vuc = vec_sld(vuc, vuc, 16);  // expected-error {{no matching function}}
+  vuc = vec_sld(vuc, vuc, 16);  // expected-error {{no matching function}} expected-error {{argument value 16 is outside the valid range [0, 15]}}
                                 // expected-note at vecintrin.h:* 11 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
-  vss = vec_sld(vss, vss, idx); // expected-error {{no matching function}}
+  vss = vec_sld(vss, vss, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vus = vec_sld(vus, vus, idx); // expected-error {{no matching function}}
+  vus = vec_sld(vus, vus, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 11 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
-  vsi = vec_sld(vsi, vsi, idx); // expected-error {{no matching function}}
+  vsi = vec_sld(vsi, vsi, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vui = vec_sld(vui, vui, idx); // expected-error {{no matching function}}
+  vui = vec_sld(vui, vui, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 11 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
-  vsl = vec_sld(vsl, vsl, idx); // expected-error {{no matching function}}
+  vsl = vec_sld(vsl, vsl, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vul = vec_sld(vul, vul, idx); // expected-error {{no matching function}}
+  vul = vec_sld(vul, vul, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 11 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
-  vd = vec_sld(vd, vd, idx);    // expected-error {{no matching function}}
+  vd = vec_sld(vd, vd, idx);    // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                 // expected-note at vecintrin.h:* 12 {{candidate function not viable}}
                                 // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
 
-  vsc = vec_sldw(vsc, vsc, idx); // expected-error {{no matching function}}
+  vsc = vec_sldw(vsc, vsc, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vsc = vec_sldw(vsc, vsc, -1);  // expected-error {{no matching function}}
+  vsc = vec_sldw(vsc, vsc, -1);  // expected-error {{no matching function}} expected-error {{argument value -4 is outside the valid range [0, 15]}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vsc = vec_sldw(vsc, vsc, 4);   // expected-error {{no matching function}}
+  vsc = vec_sldw(vsc, vsc, 4);   // expected-error {{no matching function}} expected-error {{argument value 16 is outside the valid range [0, 15]}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vuc = vec_sldw(vuc, vuc, idx); // expected-error {{no matching function}}
+  vuc = vec_sldw(vuc, vuc, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vuc = vec_sldw(vuc, vuc, -1);  // expected-error {{no matching function}}
+  vuc = vec_sldw(vuc, vuc, -1);  // expected-error {{no matching function}} expected-error {{argument value -4 is outside the valid range [0, 15]}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vuc = vec_sldw(vuc, vuc, 4);   // expected-error {{no matching function}}
+  vuc = vec_sldw(vuc, vuc, 4);   // expected-error {{no matching function}} expected-error {{argument value 16 is outside the valid range [0, 15]}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vss = vec_sldw(vss, vss, idx); // expected-error {{no matching function}}
+  vss = vec_sldw(vss, vss, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vus = vec_sldw(vus, vus, idx); // expected-error {{no matching function}}
+  vus = vec_sldw(vus, vus, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vsi = vec_sldw(vsi, vsi, idx); // expected-error {{no matching function}}
+  vsi = vec_sldw(vsi, vsi, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vui = vec_sldw(vui, vui, idx); // expected-error {{no matching function}}
+  vui = vec_sldw(vui, vui, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vsl = vec_sldw(vsl, vsl, idx); // expected-error {{no matching function}}
+  vsl = vec_sldw(vsl, vsl, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vul = vec_sldw(vul, vul, idx); // expected-error {{no matching function}}
+  vul = vec_sldw(vul, vul, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
-  vd = vec_sldw(vd, vd, idx);    // expected-error {{no matching function}}
+  vd = vec_sldw(vd, vd, idx);    // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 8 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
 }

diff  --git a/clang/test/CodeGen/SystemZ/builtins-systemz-zvector2-error.c b/clang/test/CodeGen/SystemZ/builtins-systemz-zvector2-error.c
index 64fcbc46ba0da..b7e0d77efca6d 100644
--- a/clang/test/CodeGen/SystemZ/builtins-systemz-zvector2-error.c
+++ b/clang/test/CodeGen/SystemZ/builtins-systemz-zvector2-error.c
@@ -119,12 +119,12 @@ void test_core(void) {
 }
 
 void test_integer(void) {
-  vf = vec_sld(vf, vf, idx);    // expected-error {{no matching function}}
-                                // expected-note at vecintrin.h:* 13 {{candidate function not viable}}
-                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
-  vd = vec_sld(vd, vd, idx);    // expected-error {{no matching function}}
-                                // expected-note at vecintrin.h:* 13 {{candidate function not viable}}
-                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
+  vf = vec_sld(vf, vf, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
+                             // expected-note at vecintrin.h:* 13 {{candidate function not viable}}
+                             // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
+  vd = vec_sld(vd, vd, idx); // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vsldb' must be a constant integer}}
+                             // expected-note at vecintrin.h:* 13 {{candidate function not viable}}
+                             // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
 
   vuc = vec_msum_u128(vul, vul, vuc, idx);  // expected-error {{must be a constant integer}}
   vuc = vec_msum_u128(vul, vul, vuc, -1);   // expected-error-re {{argument value {{.*}} is outside the valid range}}
@@ -132,22 +132,22 @@ void test_integer(void) {
 }
 
 void test_float(void) {
-  vbi = vec_fp_test_data_class(vf, idx, &cc);   // expected-error {{no matching function}}
-                                                // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
-                                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
-  vbi = vec_fp_test_data_class(vf, -1, &cc);    // expected-error {{no matching function}}
-                                                // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
-                                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
-  vbi = vec_fp_test_data_class(vf, 4096, &cc);  // expected-error {{no matching function}}
-                                                // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
-                                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
-  vbl = vec_fp_test_data_class(vd, idx, &cc);   // expected-error {{no matching function}}
-                                                // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
-                                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
-  vbl = vec_fp_test_data_class(vd, -1, &cc);    // expected-error {{no matching function}}
-                                                // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
-                                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
-  vbl = vec_fp_test_data_class(vd, 4096, &cc);  // expected-error {{no matching function}}
-                                                // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
-                                                // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
+  vbi = vec_fp_test_data_class(vf, idx, &cc);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vftcisb' must be a constant integer}} expected-error {{argument to '__builtin_s390_vftcidb' must be a constant integer}}
+                                               // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
+                                               // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
+  vbi = vec_fp_test_data_class(vf, -1, &cc);   // expected-error {{no matching function}} expected-error 2{{argument value -1 is outside the valid range [0, 4095]}}
+                                               // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
+                                               // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
+  vbi = vec_fp_test_data_class(vf, 4096, &cc); // expected-error {{no matching function}} expected-error 2{{argument value 4096 is outside the valid range [0, 4095]}}
+                                               // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
+                                               // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
+  vbl = vec_fp_test_data_class(vd, idx, &cc);  // expected-error {{no matching function}} expected-error {{argument to '__builtin_s390_vftcisb' must be a constant integer}} expected-error {{argument to '__builtin_s390_vftcidb' must be a constant integer}}
+                                               // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
+                                               // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
+  vbl = vec_fp_test_data_class(vd, -1, &cc);   // expected-error {{no matching function}} expected-error 2{{argument value -1 is outside the valid range [0, 4095]}}
+                                               // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
+                                               // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
+  vbl = vec_fp_test_data_class(vd, 4096, &cc); // expected-error {{no matching function}} expected-error 2{{argument value 4096 is outside the valid range [0, 4095]}}
+                                               // expected-note at vecintrin.h:* 1 {{candidate function not viable}}
+                                               // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 4095}}
 }

diff  --git a/clang/test/CodeGen/SystemZ/builtins-systemz-zvector3-error.c b/clang/test/CodeGen/SystemZ/builtins-systemz-zvector3-error.c
index 557b9a3a7ec1b..135e586f38aea 100644
--- a/clang/test/CodeGen/SystemZ/builtins-systemz-zvector3-error.c
+++ b/clang/test/CodeGen/SystemZ/builtins-systemz-zvector3-error.c
@@ -60,66 +60,85 @@ volatile int idx;
 int cc;
 
 void test_integer(void) {
-  vsc = vec_sldb(vsc, vsc, idx); // expected-error {{no matching function}}
+  vsc = vec_sldb(vsc, vsc, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vuc = vec_sldb(vuc, vuc, idx); // expected-error {{no matching function}}
+  vuc = vec_sldb(vuc, vuc, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vss = vec_sldb(vss, vss, idx); // expected-error {{no matching function}}
+  vss = vec_sldb(vss, vss, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vus = vec_sldb(vus, vus, idx); // expected-error {{no matching function}}
+  vus = vec_sldb(vus, vus, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vsi = vec_sldb(vsi, vsi, idx); // expected-error {{no matching function}}
+  vsi = vec_sldb(vsi, vsi, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vui = vec_sldb(vui, vui, idx); // expected-error {{no matching function}}
+  vui = vec_sldb(vui, vui, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vsl = vec_sldb(vsl, vsl, idx); // expected-error {{no matching function}}
+  vsl = vec_sldb(vsl, vsl, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vul = vec_sldb(vul, vul, idx); // expected-error {{no matching function}}
+  vul = vec_sldb(vul, vul, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vf = vec_sldb(vf, vf, idx);    // expected-error {{no matching function}}
+  vf = vec_sldb(vf, vf, idx);    // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vd = vec_sldb(vd, vd, idx);    // expected-error {{no matching function}}
+  vd = vec_sldb(vd, vd, idx);    // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
 
-  vsc = vec_srdb(vsc, vsc, idx); // expected-error {{no matching function}}
+  vsc = vec_srdb(vsc, vsc, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vuc = vec_srdb(vuc, vuc, idx); // expected-error {{no matching function}}
+  vuc = vec_srdb(vuc, vuc, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vss = vec_srdb(vss, vss, idx); // expected-error {{no matching function}}
+  vss = vec_srdb(vss, vss, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vus = vec_srdb(vus, vus, idx); // expected-error {{no matching function}}
+  vus = vec_srdb(vus, vus, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vsi = vec_srdb(vsi, vsi, idx); // expected-error {{no matching function}}
+  vsi = vec_srdb(vsi, vsi, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vui = vec_srdb(vui, vui, idx); // expected-error {{no matching function}}
+  vui = vec_srdb(vui, vui, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vsl = vec_srdb(vsl, vsl, idx); // expected-error {{no matching function}}
+  vsl = vec_srdb(vsl, vsl, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vul = vec_srdb(vul, vul, idx); // expected-error {{no matching function}}
+  vul = vec_srdb(vul, vul, idx); // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vf = vec_srdb(vf, vf, idx);    // expected-error {{no matching function}}
+  vf = vec_srdb(vf, vf, idx);    // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
-  vd = vec_srdb(vd, vd, idx);    // expected-error {{no matching function}}
+  vd = vec_srdb(vd, vd, idx);    // expected-error {{no matching function}} \
+                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
                                  // expected-note at vecintrin.h:* 9 {{candidate function not viable}}
                                  // expected-note at vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
 }
-

diff  --git a/clang/test/CodeGen/builtins-ppc-error.c b/clang/test/CodeGen/builtins-ppc-error.c
index 6557565938b0c..7f52521d14dfc 100644
--- a/clang/test/CodeGen/builtins-ppc-error.c
+++ b/clang/test/CodeGen/builtins-ppc-error.c
@@ -48,8 +48,8 @@ void testXXSLDWI(int index) {
 }
 
 void testCTF(int index) {
-  vec_ctf(vsi, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}}
-  vec_ctf(vui, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}}
+  vec_ctf(vsi, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}} expected-error {{argument to '__builtin_altivec_vcfux' must be a constant integer}}
+  vec_ctf(vui, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}} expected-error {{argument to '__builtin_altivec_vcfux' must be a constant integer}}
 }
 
 void testVCFSX(int index) {

diff  --git a/clang/test/Index/complete-switch.c b/clang/test/Index/complete-switch.c
index 9a9438c28d31f..4a78854595543 100644
--- a/clang/test/Index/complete-switch.c
+++ b/clang/test/Index/complete-switch.c
@@ -6,5 +6,5 @@ void f() {
   }
 }
 
-// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:4:10 %s | FileCheck %s -allow-empty
+// RUN: not %clang_cc1 -fsyntax-only -fno-recovery-ast -code-completion-at=%s:4:10 %s | FileCheck %s -allow-empty
 // CHECK-NOT: COMPLETION: foo

diff  --git a/clang/test/OpenMP/begin_declare_variant_messages.c b/clang/test/OpenMP/begin_declare_variant_messages.c
index 63aee2799b784..a6ed043de1023 100644
--- a/clang/test/OpenMP/begin_declare_variant_messages.c
+++ b/clang/test/OpenMP/begin_declare_variant_messages.c
@@ -80,7 +80,7 @@ const int var;
 #pragma omp end declare variant
 #pragma omp begin declare variant match(device={kind(score cpu)}) // expected-error {{expected '(' after 'score'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('<invalid>'); score ignored}}
 #pragma omp end declare variant
-#pragma omp begin declare variant match(device={kind(score( ibm)}) // expected-error {{use of undeclared identifier 'ibm'}} expected-error {{expected ')'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('<invalid>'); score ignored}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
+#pragma omp begin declare variant match(device = {kind(score(ibm) }) // expected-error {{use of undeclared identifier 'ibm'}} expected-error {{expected ')'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('<recovery-expr>()'); score ignored}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
 #pragma omp end declare variant
 #pragma omp begin declare variant match(device={kind(score(2 gpu)}) // expected-error {{expected ')'}} expected-error {{expected ')'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('2'); score ignored}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{to match this '('}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
 #pragma omp end declare variant

diff  --git a/clang/test/OpenMP/declare_variant_messages.c b/clang/test/OpenMP/declare_variant_messages.c
index 2c63ca206fbbc..18bb7e331f27c 100644
--- a/clang/test/OpenMP/declare_variant_messages.c
+++ b/clang/test/OpenMP/declare_variant_messages.c
@@ -10,7 +10,7 @@ int foo(void);
 #pragma omp declare variant // expected-error {{expected '(' after 'declare variant'}}
 #pragma omp declare variant( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp declare variant(foo // expected-error {{expected ')'}} expected-error {{expected 'match' clause on 'omp declare variant' directive}} expected-note {{to match this '('}}
-#pragma omp declare variant(x) // expected-error {{use of undeclared identifier 'x'}}
+#pragma omp declare variant(x) // expected-error {{use of undeclared identifier 'x'}} expected-error {{expected 'match' clause on}}
 #pragma omp declare variant(foo) // expected-error {{expected 'match' clause on 'omp declare variant' directive}}
 #pragma omp declare variant(foo) // expected-error {{expected 'match' clause on 'omp declare variant' directive}}
 #pragma omp declare variant(foo) xxx // expected-error {{expected 'match' clause on 'omp declare variant' directive}}
@@ -41,7 +41,7 @@ int foo(void);
 #pragma omp declare variant(foo) match(device={kind(}) // expected-error {{expected ')'}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
 #pragma omp declare variant(foo) match(device={kind()}) // expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}}
 #pragma omp declare variant(foo) match(device={kind(score cpu)}) // expected-error {{expected '(' after 'score'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('<invalid>'); score ignored}}
-#pragma omp declare variant(foo) match(device={kind(score( ibm)}) // expected-error {{use of undeclared identifier 'ibm'}} expected-error {{expected ')'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('<invalid>'); score ignored}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
+#pragma omp declare variant(foo) match(device = {kind(score(ibm) }) // expected-error {{use of undeclared identifier 'ibm'}} expected-error {{expected ')'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('<recovery-expr>()'); score ignored}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
 #pragma omp declare variant(foo) match(device={kind(score(2 gpu)}) // expected-error {{expected ')'}} expected-error {{expected ')'}} expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('2'); score ignored}} expected-warning {{expected identifier or string literal describing a context property; property skipped}} expected-note {{to match this '('}} expected-note {{context property options are: 'host' 'nohost' 'cpu' 'gpu' 'fpga' 'any'}} expected-note {{to match this '('}}
 #pragma omp declare variant(foo) match(device={kind(score(foo()) ibm)}) // expected-warning {{expected '':'' after the score expression; '':'' assumed}} expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('foo()'); score ignored}} expected-warning {{'ibm' is not a valid context property for the context selector 'kind' and the context set 'device'; property ignored}} expected-note {{try 'match(implementation={vendor(ibm)})'}} expected-note {{the ignored property spans until here}}
 #pragma omp declare variant(foo) match(device={kind(score(5): host), kind(llvm)}) // expected-warning {{the context selector 'kind' in the context set 'device' cannot have a score ('5'); score ignored}} expected-warning {{the context selector 'kind' was used already in the same 'omp declare variant' directive; selector ignored}} expected-note {{the previous context selector 'kind' used here}} expected-note {{the ignored selector spans until here}}

diff  --git a/clang/test/Parser/objc-foreach-syntax.m b/clang/test/Parser/objc-foreach-syntax.m
index 5d83dc69fcd9c..0f4a14f2b7856 100644
--- a/clang/test/Parser/objc-foreach-syntax.m
+++ b/clang/test/Parser/objc-foreach-syntax.m
@@ -21,5 +21,8 @@ - (void)compilerTestAgainst {
 
 
 static int test7(id keys) {
-  for (id key; in keys) ;  // expected-error {{use of undeclared identifier 'in'}}
+  // FIXME: would be nice to suppress the secondary diagnostics.
+  for (id key; in keys) ;  // expected-error {{use of undeclared identifier 'in'}} \
+                           // expected-error {{expected ';' in 'for' statement specifier}} \
+                           // expected-warning {{expression result unused}}
 }

diff  --git a/clang/test/Sema/__try.c b/clang/test/Sema/__try.c
index f7c5c97da1044..1953c61613456 100644
--- a/clang/test/Sema/__try.c
+++ b/clang/test/Sema/__try.c
@@ -50,9 +50,9 @@ void TEST() {
 }  // expected-error{{expected '__except' or '__finally' block}}
 
 void TEST() {
-  __except ( FilterExpression() ) { // expected-warning{{implicit declaration of function '__except' is invalid in C99}} \
-    // expected-error{{too few arguments to function call, expected 1, have 0}}
-
+  __except (FilterExpression()) { // expected-warning{{implicit declaration of function '__except' is invalid in C99}} \
+    // expected-error{{too few arguments to function call, expected 1, have 0}} \
+    // expected-error{{expected ';' after expression}}
   }
 }
 

diff  --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c
index 7681ebccd4fa8..c5ff13a0e6eb7 100644
--- a/clang/test/Sema/enum.c
+++ b/clang/test/Sema/enum.c
@@ -100,7 +100,8 @@ int CheckPR4515[PR4515b==0?1:-1];
 // PR7911
 extern enum PR7911T PR7911V; // expected-warning{{ISO C forbids forward references to 'enum' types}}
 void PR7911F() {
-  switch (PR7911V); // expected-error {{statement requires expression of integer type}}
+  switch (PR7911V) // expected-error {{statement requires expression of integer type}}
+    ;
 }
 
 char test5[__has_feature(enumerator_attributes) ? 1 : -1];

diff  --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c
index 73ba265509e4c..f70eb8b5cf15b 100644
--- a/clang/test/Sema/typo-correction.c
+++ b/clang/test/Sema/typo-correction.c
@@ -14,9 +14,9 @@ a = b ? : 0;  // expected-warning {{type specifier missing, defaults to 'int'}}
               // expected-error {{use of undeclared identifier 'b'}}
 
 int foobar;  // expected-note {{'foobar' declared here}}
-a = goobar ?: 4;  // expected-warning {{type specifier missing, defaults to 'int'}} \
-                  // expected-error {{use of undeclared identifier 'goobar'; did you mean 'foobar'?}} \
-                  // expected-error {{initializer element is not a compile-time constant}}
+new_a = goobar ?: 4; // expected-warning {{type specifier missing, defaults to 'int'}} \
+                      // expected-error {{use of undeclared identifier 'goobar'; did you mean 'foobar'?}} \
+                      // expected-error {{initializer element is not a compile-time constant}}
 
 struct ContainerStuct {
   enum { SOME_ENUM }; // expected-note {{'SOME_ENUM' declared here}}
@@ -50,10 +50,10 @@ void fn1() {
   cabs(errij);  // expected-error {{use of undeclared identifier 'errij'}}
 }
 
-extern long afunction(int); // expected-note {{'afunction' declared here}}
+extern long afunction(int);
 void fn2() {
-  f(THIS_IS_AN_ERROR, // expected-error {{use of undeclared identifier 'THIS_IS_AN_ERROR'}}
-    afunction(afunction_));  // expected-error {{use of undeclared identifier 'afunction_'; did you mean 'afunction'?}}
+  f(THIS_IS_AN_ERROR,       // expected-error {{use of undeclared identifier 'THIS_IS_AN_ERROR'}}
+    afunction(afunction_)); // expected-error {{use of undeclared identifier 'afunction_'}}
 }
 
 int d = X ? d : L; // expected-error 2 {{use of undeclared identifier}}


        


More information about the llvm-branch-commits mailing list