From 7714070615e1c17c8cfd07aeaeeff282ee8e33d2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 13 Oct 2022 09:59:16 +0200 Subject: [PATCH 1/3] Default to non-pie, fix rhbz#2134146 --- clang.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clang.spec b/clang.spec index 56de2fd..88ac031 100644 --- a/clang.spec +++ b/clang.spec @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -307,12 +307,9 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %define _find_debuginfo_dwz_opts %{nil} %endif -# TODO: Drop the HAVE_CXX_ATOMICS64_WITHOUT_LIB once clang15 is in the buildroot. It looks like -# previously clang emitted __atomic_load for std::atomic, which is not detected by cmake. +# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC. %cmake -G Ninja \ -%ifarch %ix86 - -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=OFF \ -%endif + -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -596,6 +593,9 @@ false %endif %changelog +* Thu Oct 13 2022 Nikita Popov - 15.0.0-3 +- Default to non-pie, fix rhbz#2134146 + * Wed Sep 14 2022 Nikita Popov - 15.0.0-2 - Downgrade implicit int and implicit function declaration to warning only From 2503e68a465e9ff755d4d150e8d75fa07860d3fe Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 3 Nov 2022 17:11:40 +0100 Subject: [PATCH 2/3] Update to LLVM 15.0.4 --- .gitignore | 4 + ...ngrade-implicit-int-and-implicit-fun.patch | 1173 ----------------- clang.spec | 16 +- sources | 8 +- 4 files changed, 16 insertions(+), 1185 deletions(-) delete mode 100644 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch diff --git a/.gitignore b/.gitignore index a6194c4..da3e479 100644 --- a/.gitignore +++ b/.gitignore @@ -223,3 +223,7 @@ /clang-tools-extra-15.0.0.src.tar.xz.sig /clang-15.0.0.src.tar.xz /clang-15.0.0.src.tar.xz.sig +/clang-tools-extra-15.0.4.src.tar.xz +/clang-tools-extra-15.0.4.src.tar.xz.sig +/clang-15.0.4.src.tar.xz +/clang-15.0.4.src.tar.xz.sig diff --git a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch b/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch deleted file mode 100644 index fd5fd1f..0000000 --- a/0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch +++ /dev/null @@ -1,1173 +0,0 @@ -From 9a95c7e534a4f0e7e992ea62cf3efc75fbdc04ae Mon Sep 17 00:00:00 2001 -From: Aaron Ballman -Date: Wed, 14 Sep 2022 09:38:39 +0200 -Subject: [PATCH] [Clang 15.0.1] Downgrade implicit int and implicit function - declaration to warning only - -The changes in Clang 15.0.0 which enabled these diagnostics as a warning which defaulted to an error caused disruption for people working on distributions such as Gentoo. There was an explicit request to downgrade these to be warning-only in Clang 15.0.1 with the expectation that Clang 16 will default the diagnostics to an error. - -See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 for more details on the discussion. ---- - clang/docs/ReleaseNotes.rst | 21 +++++------ - .../clang/Basic/DiagnosticSemaKinds.td | 8 ++--- - clang/test/C/drs/dr0xx.c | 2 +- - clang/test/C/drs/dr1xx.c | 2 +- - .../CodeGen/PowerPC/builtins-ppc-p8vector.c | 28 +++++++-------- - .../CodeGen/builtins-arm-msvc-compat-only.c | 4 +-- - clang/test/CodeGen/neon-crypto.c | 2 +- - clang/test/Driver/cxx_for_opencl.clcpp | 2 +- - clang/test/FixIt/fixit.c | 2 +- - clang/test/Frontend/fixed_point_errors.c | 4 +-- - clang/test/Frontend/fixed_point_not_enabled.c | 2 +- - .../Frontend/system-header-line-directive.c | 2 +- - clang/test/Headers/arm-cmse-header-ns.c | 10 +++--- - clang/test/Modules/config_macros.m | 2 +- - clang/test/Modules/malformed-overload.m | 2 +- - clang/test/Modules/modulemap-locations.m | 6 ++-- - clang/test/OpenMP/declare_mapper_messages.c | 4 +-- - clang/test/PCH/chain-macro-override.c | 2 +- - clang/test/Parser/altivec.c | 4 +-- - clang/test/Parser/attributes.c | 10 +++--- - clang/test/Parser/declarators.c | 8 ++--- - clang/test/Parser/objc-forcollection-neg-2.m | 2 +- - .../Preprocessor/macro_paste_msextensions.c | 2 +- - clang/test/Sema/__try.c | 2 +- - clang/test/Sema/aarch64-tme-errors.c | 2 +- - clang/test/Sema/address_spaces.c | 2 +- - clang/test/Sema/auto-type.c | 2 +- - clang/test/Sema/bitfield.c | 2 +- - clang/test/Sema/block-args.c | 2 +- - clang/test/Sema/block-literal.c | 2 +- - clang/test/Sema/builtin-setjmp.c | 4 +-- - clang/test/Sema/builtins.c | 6 ++-- - clang/test/Sema/crash-invalid-builtin.c | 2 +- - clang/test/Sema/cxx-as-c.c | 2 +- - clang/test/Sema/function.c | 6 ++-- - clang/test/Sema/implicit-builtin-decl.c | 4 +-- - clang/test/Sema/implicit-decl.c | 35 +++++++++++-------- - clang/test/Sema/implicit-int.c | 12 +++---- - clang/test/Sema/implicit-intel-builtin-decl.c | 14 ++++---- - clang/test/Sema/implicit-ms-builtin-decl.c | 12 +++---- - clang/test/Sema/invalid-decl.c | 2 +- - clang/test/Sema/invalid-struct-init.c | 2 +- - clang/test/Sema/redefinition.c | 2 +- - clang/test/Sema/typo-correction.c | 6 ++-- - clang/test/Sema/varargs.c | 2 +- - clang/test/Sema/vla.c | 2 +- - .../SemaObjC/builtin_objc_lib_functions.m | 14 ++++---- - clang/test/SemaObjC/builtin_objc_nslog.m | 4 +-- - .../SemaObjC/ivar-lookup-resolution-builtin.m | 2 +- - clang/test/SemaObjC/protocols.m | 2 +- - clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl | 2 +- - 51 files changed, 141 insertions(+), 141 deletions(-) - -diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst -index cbf3f4b37b5f..a26846a3eac4 100644 ---- a/clang/docs/ReleaseNotes.rst -+++ b/clang/docs/ReleaseNotes.rst -@@ -245,18 +245,15 @@ Improvements to Clang's diagnostics - without a prototype and with no arguments is an invalid redeclaration of a - function with a prototype. e.g., ``void f(int); void f() {}`` is now properly - diagnosed. --- The ``-Wimplicit-function-declaration`` warning diagnostic now defaults to -- an error in C99 and later. Prior to C2x, it may be downgraded to a warning -- with ``-Wno-error=implicit-function-declaration``, or disabled entirely with -- ``-Wno-implicit-function-declaration``. As of C2x, support for implicit -- function declarations has been removed, and the warning options will have no -- effect. --- The ``-Wimplicit-int`` warning diagnostic now defaults to an error in C99 and -- later. Prior to C2x, it may be downgraded to a warning with -- ``-Wno-error=implicit-int``, or disabled entirely with ``-Wno-implicit-int``. -- As of C2x, support for implicit int has been removed, and the warning options -- will have no effect. Specifying ``-Wimplicit-int`` in C89 mode will now issue -- warnings instead of being a noop. -+- The ``-Wimplicit-function-declaration`` warning diagnostic is now enabled by -+ default in C99, C11, and C17. As of C2x, support for implicit function -+ declarations has been removed, and the warning options will have no effect. -+ *NOTE* this warning will default to an error in Clang 16. -+- The ``-Wimplicit-int`` warning diagnostic is now enabled by default in C99, -+ C11, and C17. As of C2x, support for implicit int has been removed, and the -+ warning option will have no effect. Specifying ``-Wimplicit-int`` in C89 mode -+ will now issue warnings instead of being a noop. -+ *NOTE* this warning will default to an error in Clang 16. - - No longer issue a "declaration specifiers missing, defaulting to int" - diagnostic in C89 mode because it is not an extension in C89, it was valid - code. The diagnostic has been removed entirely as it did not have a -diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td -index 6ff5b8de57fd..cb460401eb47 100644 ---- a/clang/include/clang/Basic/DiagnosticSemaKinds.td -+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td -@@ -419,7 +419,7 @@ def warn_implicit_function_decl : Warning< - InGroup, DefaultIgnore; - def ext_implicit_function_decl_c99 : ExtWarn< - "call to undeclared function %0; ISO C99 and later do not support implicit " -- "function declarations">, InGroup, DefaultError; -+ "function declarations">, InGroup; - def note_function_suggestion : Note<"did you mean %0?">; - - def err_ellipsis_first_param : Error< -@@ -705,7 +705,7 @@ def ext_implicit_lib_function_decl : ExtWarn< - def ext_implicit_lib_function_decl_c99 : ExtWarn< - "call to undeclared library function '%0' with type %1; ISO C99 and later " - "do not support implicit function declarations">, -- InGroup, DefaultError; -+ InGroup; - def note_include_header_or_declare : Note< - "include the header <%0> or explicitly provide a declaration for '%1'">; - def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">; -@@ -4359,7 +4359,7 @@ def err_ident_list_in_fn_declaration : Error< - "a parameter list without types is only allowed in a function definition">; - def ext_param_not_declared : ExtWarn< - "parameter %0 was not declared, defaults to 'int'; ISO C99 and later do not " -- "support implicit int">, InGroup, DefaultError; -+ "support implicit int">, InGroup; - def err_param_default_argument : Error< - "C does not support default arguments">; - def err_param_default_argument_redefinition : Error< -@@ -10029,7 +10029,7 @@ def warn_receiver_forward_class : Warning< - def note_method_sent_forward_class : Note<"method %0 is used for the forward class">; - def ext_missing_type_specifier : ExtWarn< - "type specifier missing, defaults to 'int'; ISO C99 and later do not support " -- "implicit int">, InGroup, DefaultError; -+ "implicit int">, InGroup; - def err_missing_type_specifier : Error< - "a type specifier is required for all declarations">; - def err_decimal_unsupported : Error< -diff --git a/clang/test/C/drs/dr0xx.c b/clang/test/C/drs/dr0xx.c -index 183382406475..3bfad3637d26 100644 ---- a/clang/test/C/drs/dr0xx.c -+++ b/clang/test/C/drs/dr0xx.c -@@ -110,7 +110,7 @@ struct dr007_b; - * of treated as declaring a parameter of type 'int (*)(dr009_t);' - */ - typedef int dr009_t; --void dr009_f((dr009_t)); /* c99untilc2x-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+void dr009_f((dr009_t)); /* c99untilc2x-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} - c2xandup-error {{a type specifier is required for all declarations}} */ - - /* WG14 DR010: -diff --git a/clang/test/C/drs/dr1xx.c b/clang/test/C/drs/dr1xx.c -index 70435b523765..1e430c5fb395 100644 ---- a/clang/test/C/drs/dr1xx.c -+++ b/clang/test/C/drs/dr1xx.c -@@ -369,7 +369,7 @@ void dr163(void) { - int i; - i = undeclared; /* expected-error {{use of undeclared identifier 'undeclared'}} */ - sdfsdfsf = 1; /* expected-error {{use of undeclared identifier 'sdfsdfsf'}} */ -- i = also_undeclared(); /* c99untilc2x-error {{call to undeclared function 'also_undeclared'; ISO C99 and later do not support implicit function declarations}} -+ i = also_undeclared(); /* c99untilc2x-warning {{call to undeclared function 'also_undeclared'; ISO C99 and later do not support implicit function declarations}} - c2xandup-error {{use of undeclared identifier 'also_undeclared'}} - */ - } -diff --git a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -index af3d5c7d066b..54d2c70c0aa5 100644 ---- a/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -+++ b/clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c -@@ -143,7 +143,7 @@ void test1() { - res_vui = vec_mergee(vui, vui); - // CHECK: @llvm.ppc.altivec.vperm - // CHECK-LE: @llvm.ppc.altivec.vperm --// CHECK-PPC: error: call to undeclared function 'vec_mergee' -+// CHECK-PPC: warning: call to undeclared function 'vec_mergee' - - res_vbll = vec_mergee(vbll, vbll); - // CHECK: @llvm.ppc.altivec.vperm -@@ -177,7 +177,7 @@ void test1() { - res_vui = vec_mergeo(vui, vui); - // CHECK: @llvm.ppc.altivec.vperm - // CHECK-LE: @llvm.ppc.altivec.vperm --// CHECK-PPC: error: call to undeclared function 'vec_mergeo' -+// CHECK-PPC: warning: call to undeclared function 'vec_mergeo' - - /* vec_cmpeq */ - res_vbll = vec_cmpeq(vbll, vbll); -@@ -403,7 +403,7 @@ void test1() { - res_vsc = vec_cntlz(vsc); - // CHECK: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) - // CHECK-LE: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) --// CHECK-PPC: error: call to undeclared function 'vec_cntlz' -+// CHECK-PPC: warning: call to undeclared function 'vec_cntlz' - - res_vuc = vec_cntlz(vuc); - // CHECK: call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %{{.+}}, i1 false) -@@ -754,19 +754,19 @@ void test1() { - res_vsi = vec_vpksdss(vsll, vsll); - // CHECK: llvm.ppc.altivec.vpksdss - // CHECK-LE: llvm.ppc.altivec.vpksdss --// CHECK-PPC: error: call to undeclared function 'vec_vpksdss' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpksdss' - - /* vec_vpksdus */ - res_vui = vec_vpksdus(vsll, vsll); - // CHECK: llvm.ppc.altivec.vpksdus - // CHECK-LE: llvm.ppc.altivec.vpksdus --// CHECK-PPC: error: call to undeclared function 'vec_vpksdus' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpksdus' - - /* vec_vpkudum */ - res_vsi = vec_vpkudum(vsll, vsll); - // CHECK: vperm - // CHECK-LE: vperm --// CHECK-PPC: error: call to undeclared function 'vec_vpkudum' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpkudum' - - res_vui = vec_vpkudum(vull, vull); - // CHECK: vperm -@@ -775,13 +775,13 @@ void test1() { - res_vui = vec_vpkudus(vull, vull); - // CHECK: llvm.ppc.altivec.vpkudus - // CHECK-LE: llvm.ppc.altivec.vpkudus --// CHECK-PPC: error: call to undeclared function 'vec_vpkudus' -+// CHECK-PPC: warning: call to undeclared function 'vec_vpkudus' - - /* vec_vupkhsw */ - res_vsll = vec_vupkhsw(vsi); - // CHECK: llvm.ppc.altivec.vupkhsw - // CHECK-LE: llvm.ppc.altivec.vupklsw --// CHECK-PPC: error: call to undeclared function 'vec_vupkhsw' -+// CHECK-PPC: warning: call to undeclared function 'vec_vupkhsw' - - res_vbll = vec_vupkhsw(vbi); - // CHECK: llvm.ppc.altivec.vupkhsw -@@ -791,7 +791,7 @@ void test1() { - res_vsll = vec_vupklsw(vsi); - // CHECK: llvm.ppc.altivec.vupklsw - // CHECK-LE: llvm.ppc.altivec.vupkhsw --// CHECK-PPC: error: call to undeclared function 'vec_vupklsw' -+// CHECK-PPC: warning: call to undeclared function 'vec_vupklsw' - - res_vbll = vec_vupklsw(vbi); - // CHECK: llvm.ppc.altivec.vupklsw -@@ -845,7 +845,7 @@ void test1() { - // CHECK: xor <16 x i8> [[T1]], - // CHECK-LE: [[T1:%.+]] = and <16 x i8> - // CHECK-LE: xor <16 x i8> [[T1]], --// CHECK-PPC: error: call to undeclared function 'vec_nand' -+// CHECK-PPC: warning: call to undeclared function 'vec_nand' - - res_vbc = vec_nand(vbc, vbc); - // CHECK: [[T1:%.+]] = and <16 x i8> -@@ -937,7 +937,7 @@ void test1() { - // CHECK: or <16 x i8> {{%.+}}, [[T1]] - // CHECK-LE: [[T1:%.+]] = xor <16 x i8> {{%.+}}, - // CHECK-LE: or <16 x i8> {{%.+}}, [[T1]] --// CHECK-PPC: error: call to undeclared function 'vec_orc' -+// CHECK-PPC: warning: call to undeclared function 'vec_orc' - - res_vsc = vec_orc(vsc, vbc); - // CHECK: [[T1:%.+]] = xor <16 x i8> {{%.+}}, -@@ -1166,7 +1166,7 @@ void test1() { - res_vsll = vec_vbpermq(vuc, vuc); - // CHECK: llvm.ppc.altivec.vbpermq - // CHECK-LE: llvm.ppc.altivec.vbpermq --// CHECK-PPC: error: call to undeclared function 'vec_vbpermq' -+// CHECK-PPC: warning: call to undeclared function 'vec_vbpermq' - - /* vec_vgbbd */ - res_vsc = vec_vgbbd(vsc); -@@ -1176,12 +1176,12 @@ void test1() { - res_vuc = vec_vgbbd(vuc); - // CHECK: llvm.ppc.altivec.vgbbd - // CHECK-LE: llvm.ppc.altivec.vgbbd --// CHECK-PPC: error: call to undeclared function 'vec_vgbbd' -+// CHECK-PPC: warning: call to undeclared function 'vec_vgbbd' - - res_vuc = vec_gb(vuc); - // CHECK: llvm.ppc.altivec.vgbbd - // CHECK-LE: llvm.ppc.altivec.vgbbd --// CHECK-PPC: error: call to undeclared function 'vec_gb' -+// CHECK-PPC: warning: call to undeclared function 'vec_gb' - - res_vsll = vec_gbb(vsll); - // CHECK: llvm.ppc.altivec.vgbbd -diff --git a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c -index 42cc9d70a142..c2b021b31174 100644 ---- a/clang/test/CodeGen/builtins-arm-msvc-compat-only.c -+++ b/clang/test/CodeGen/builtins-arm-msvc-compat-only.c -@@ -1,6 +1,6 @@ - // RUN: %clang_cc1 -triple thumbv7-windows -fms-extensions -emit-llvm -o - %s \ - // RUN: | FileCheck %s -check-prefix CHECK-MSVC --// RUN: not %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \ -+// RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \ - // RUN: | FileCheck %s -check-prefix CHECK-EABI - // REQUIRES: arm-registered-target - -@@ -9,7 +9,7 @@ void emit() { - } - - // CHECK-MSVC: call void asm sideeffect ".inst.n 0xDEFE", ""() --// CHECK-EABI: error: call to undeclared function '__emit' -+// CHECK-EABI: warning: call to undeclared function '__emit' - - void emit_truncated() { - __emit(0x11110000); // movs r0, r0 -diff --git a/clang/test/CodeGen/neon-crypto.c b/clang/test/CodeGen/neon-crypto.c -index 916886574416..1b29b1a53096 100644 ---- a/clang/test/CodeGen/neon-crypto.c -+++ b/clang/test/CodeGen/neon-crypto.c -@@ -14,7 +14,7 @@ - - uint8x16_t test_vaeseq_u8(uint8x16_t data, uint8x16_t key) { - // CHECK-LABEL: @test_vaeseq_u8 -- // CHECK-NO-CRYPTO: error: call to undeclared function 'vaeseq_u8' -+ // CHECK-NO-CRYPTO: warning: call to undeclared function 'vaeseq_u8' - return vaeseq_u8(data, key); - // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aese(<16 x i8> %data, <16 x i8> %key) - } -diff --git a/clang/test/Driver/cxx_for_opencl.clcpp b/clang/test/Driver/cxx_for_opencl.clcpp -index fc2fc621791d..e3e89c53b888 100644 ---- a/clang/test/Driver/cxx_for_opencl.clcpp -+++ b/clang/test/Driver/cxx_for_opencl.clcpp -@@ -13,6 +13,6 @@ kernel void k(){ - auto a = get_local_id(1); - #ifndef __OPENCL_CPP_VERSION__ - //expected-error@-2{{OpenCL C version 2.0 does not support the 'auto' storage class specifier}} --//expected-error@-3{{type specifier missing, defaults to 'int'}} -+//expected-warning@-3{{type specifier missing, defaults to 'int'}} - #endif - } -diff --git a/clang/test/FixIt/fixit.c b/clang/test/FixIt/fixit.c -index eda00c35ccbb..c929b5abc5ee 100644 ---- a/clang/test/FixIt/fixit.c -+++ b/clang/test/FixIt/fixit.c -@@ -29,7 +29,7 @@ int array0[5] = { [3] 3 }; // expected-warning {{GNU 'missing ='}} - - // CHECK: int x - // CHECK: int y --void f1(x, y) // expected-error 2{{was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} -+void f1(x, y) // expected-warning 2{{was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} - { - } - -diff --git a/clang/test/Frontend/fixed_point_errors.c b/clang/test/Frontend/fixed_point_errors.c -index 6a711936f239..2d12a1ebb10b 100644 ---- a/clang/test/Frontend/fixed_point_errors.c -+++ b/clang/test/Frontend/fixed_point_errors.c -@@ -228,9 +228,9 @@ void CheckSuffixOnIntegerLiterals(void) { - - // Using auto - auto auto_fract = 0r; // expected-error{{invalid suffix 'r' on integer constant}} -- // expected-error@-1{{type specifier missing, defaults to 'int'}} -+ // expected-warning@-1{{type specifier missing, defaults to 'int'}} - auto auto_accum = 0k; // expected-error{{invalid suffix 'k' on integer constant}} -- // expected-error@-1{{type specifier missing, defaults to 'int'}} -+ // expected-warning@-1{{type specifier missing, defaults to 'int'}} - } - - // Ok conversions -diff --git a/clang/test/Frontend/fixed_point_not_enabled.c b/clang/test/Frontend/fixed_point_not_enabled.c -index a1a60c5a6fa8..e7522213f98d 100644 ---- a/clang/test/Frontend/fixed_point_not_enabled.c -+++ b/clang/test/Frontend/fixed_point_not_enabled.c -@@ -11,7 +11,7 @@ unsigned long _Accum u_long_accum; // expected-error{{compile with '-ffixed-p - // Aliased fixed point types - short _Accum short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} - _Accum accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -- // expected-error@-1{{type specifier missing, defaults to 'int'}} -+ // expected-warning@-1{{type specifier missing, defaults to 'int'}} - long _Accum long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} - - // Cannot use fixed point suffixes -diff --git a/clang/test/Frontend/system-header-line-directive.c b/clang/test/Frontend/system-header-line-directive.c -index d5705e028daa..0de69196d76e 100644 ---- a/clang/test/Frontend/system-header-line-directive.c -+++ b/clang/test/Frontend/system-header-line-directive.c -@@ -3,7 +3,7 @@ - #include - #include - --// expected-error@line-directive.h:* {{type specifier missing, defaults to 'int'}} -+// expected-warning@line-directive.h:* {{type specifier missing, defaults to 'int'}} - #include "line-directive.h" - - // This tests that "#line" directives in system headers preserve system -diff --git a/clang/test/Headers/arm-cmse-header-ns.c b/clang/test/Headers/arm-cmse-header-ns.c -index dfbef2c00291..b4112a4fc79a 100644 ---- a/clang/test/Headers/arm-cmse-header-ns.c -+++ b/clang/test/Headers/arm-cmse-header-ns.c -@@ -1,4 +1,4 @@ --// RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-c %s -+// RUN: %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-c %s - // RUN: not %clang_cc1 -triple thumbv8m.base-eabi -fsyntax-only -x c++ %s 2>&1 | FileCheck --check-prefix=CHECK-cpp %s - - #include -@@ -16,10 +16,10 @@ void func(callback_t fptr, void *p) - cmse_TTAT(p); - cmse_TTA_fptr(fptr); - cmse_TTAT_fptr(fptr); --// CHECK-c: error: call to undeclared function 'cmse_TTA' --// CHECK-c: error: call to undeclared function 'cmse_TTAT' --// CHECK-c: error: call to undeclared function 'cmse_TTA_fptr' --// CHECK-c: error: call to undeclared function 'cmse_TTAT_fptr' -+// CHECK-c: warning: call to undeclared function 'cmse_TTA' -+// CHECK-c: warning: call to undeclared function 'cmse_TTAT' -+// CHECK-c: warning: call to undeclared function 'cmse_TTA_fptr' -+// CHECK-c: warning: call to undeclared function 'cmse_TTAT_fptr' - // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA' - // CHECK-cpp: error: use of undeclared identifier 'cmse_TTAT' - // CHECK-cpp: error: use of undeclared identifier 'cmse_TTA_fptr' -diff --git a/clang/test/Modules/config_macros.m b/clang/test/Modules/config_macros.m -index dd071993809b..68ef6508afe6 100644 ---- a/clang/test/Modules/config_macros.m -+++ b/clang/test/Modules/config_macros.m -@@ -5,7 +5,7 @@ int *test_foo(void) { - } - - char *test_bar(void) { -- return bar(); // expected-error{{call to undeclared function 'bar'; ISO C99 and later do not support implicit function declarations}} \ -+ return bar(); // expected-warning{{call to undeclared function 'bar'; ISO C99 and later do not support implicit function declarations}} \ - // expected-error{{incompatible integer to pointer conversion}} - } - -diff --git a/clang/test/Modules/malformed-overload.m b/clang/test/Modules/malformed-overload.m -index fd5d2f4f696b..369de580c9d7 100644 ---- a/clang/test/Modules/malformed-overload.m -+++ b/clang/test/Modules/malformed-overload.m -@@ -1,6 +1,6 @@ - // RUN: rm -rf %t - // RUN: %clang_cc1 -fsyntax-only -I%S/Inputs/malformed-overload -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Wno-strict-prototypes -verify %s --NSLog(@"%@", path); // expected-error {{expected parameter declarator}} expected-error {{expected ')'}} expected-error {{type specifier missing}} expected-warning {{incompatible redeclaration}} expected-note {{to match this '('}} expected-note {{'NSLog' is a builtin with type}} -+NSLog(@"%@", path); // expected-error {{expected parameter declarator}} expected-error {{expected ')'}} expected-warning {{type specifier missing}} expected-warning {{incompatible redeclaration}} expected-note {{to match this '('}} expected-note {{'NSLog' is a builtin with type}} - #import "X.h" - - @class NSString; -diff --git a/clang/test/Modules/modulemap-locations.m b/clang/test/Modules/modulemap-locations.m -index e5738e105263..08e06f47f5c8 100644 ---- a/clang/test/Modules/modulemap-locations.m -+++ b/clang/test/Modules/modulemap-locations.m -@@ -12,9 +12,7 @@ - - void test(void) { - will_be_found1(); -- wont_be_found1(); // expected-error{{call to undeclared function 'wont_be_found1'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note {{did you mean 'will_be_found1'?}} \ -- expected-note@Inputs/ModuleMapLocations/Module_ModuleMap/a.h:1 {{'will_be_found1' declared here}} -+ wont_be_found1(); // expected-warning{{call to undeclared function 'wont_be_found1'; ISO C99 and later do not support implicit function declarations}} - will_be_found2(); -- wont_be_found2(); // expected-error{{call to undeclared function 'wont_be_found2'; ISO C99 and later do not support implicit function declarations}} -+ wont_be_found2(); // expected-warning{{call to undeclared function 'wont_be_found2'; ISO C99 and later do not support implicit function declarations}} - } -diff --git a/clang/test/OpenMP/declare_mapper_messages.c b/clang/test/OpenMP/declare_mapper_messages.c -index ae95dc81caef..ab9e63ede450 100644 ---- a/clang/test/OpenMP/declare_mapper_messages.c -+++ b/clang/test/OpenMP/declare_mapper_messages.c -@@ -42,9 +42,9 @@ int fun(int arg) { - {} - #pragma omp target map(mapper:vv) // expected-error {{expected '(' after 'mapper'}} - {} --#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} -+#pragma omp target map(mapper( :vv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-warning {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} - {} --#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} -+#pragma omp target map(mapper(aa :vv) // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-warning {{call to undeclared function 'mapper'}} expected-note {{to match this '('}} - {} - #pragma omp target map(mapper(ab) :vv) // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}} - {} -diff --git a/clang/test/PCH/chain-macro-override.c b/clang/test/PCH/chain-macro-override.c -index 26abae1cb9d5..62b05324ed44 100644 ---- a/clang/test/PCH/chain-macro-override.c -+++ b/clang/test/PCH/chain-macro-override.c -@@ -10,7 +10,7 @@ int foo(void) { - f(); - g(); - h(); -- h2(); // expected-error {{call to undeclared function 'h2'; ISO C99 and later do not support implicit function declarations}} -+ h2(); // expected-warning {{call to undeclared function 'h2'; ISO C99 and later do not support implicit function declarations}} - h3(); - return x; - } -diff --git a/clang/test/Parser/altivec.c b/clang/test/Parser/altivec.c -index 66d2ca33ed91..3f344e9c5a13 100644 ---- a/clang/test/Parser/altivec.c -+++ b/clang/test/Parser/altivec.c -@@ -97,8 +97,8 @@ vector unsigned long int v_uli; // nonaix-warning {{Use of 'long' with '__ve - // These should have warnings. - __vector long double vv_ld; // expected-error {{cannot use 'long double' with '__vector'}} - vector long double v_ld; // expected-error {{cannot use 'long double' with '__vector'}} --vector bool v_b; // expected-error {{type specifier missing, defaults to 'int'}} --vector __bool v___b; // expected-error {{type specifier missing, defaults to 'int'}} -+vector bool v_b; // expected-warning {{type specifier missing, defaults to 'int'}} -+vector __bool v___b; // expected-warning {{type specifier missing, defaults to 'int'}} - - // These should have errors. - #ifndef __VSX__ -diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c -index fe22c7e98a53..3375c4bc3741 100644 ---- a/clang/test/Parser/attributes.c -+++ b/clang/test/Parser/attributes.c -@@ -7,7 +7,7 @@ foo(void) { - } - - --__attribute__(()) y; // expected-error {{type specifier missing, defaults to 'int'}} -+__attribute__(()) y; // expected-warning {{type specifier missing, defaults to 'int'}} - - // PR2796 - int (__attribute__(()) *z)(long y); -@@ -19,8 +19,8 @@ int f2(y, __attribute__(()) x); // expected-error {{expected identifier}} - - // This is parsed as a normal argument list (with two args that are implicit - // int) because the __attribute__ is a declspec. --void f3(__attribute__(()) x, // expected-error {{type specifier missing, defaults to 'int'}} -- y); // expected-error {{type specifier missing, defaults to 'int'}} -+void f3(__attribute__(()) x, // expected-warning {{type specifier missing, defaults to 'int'}} -+ y); // expected-warning {{type specifier missing, defaults to 'int'}} - - void f4(__attribute__(())); // expected-error {{expected parameter declarator}} - -@@ -30,14 +30,14 @@ int baz(int (__attribute__(()) *x)(long y)); - - void g1(void (*f1)(__attribute__(()) int x)); - void g2(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}} --void g3(void (*f3)(__attribute__(()) x, int y)); // expected-error {{type specifier missing, defaults to 'int'}} -+void g3(void (*f3)(__attribute__(()) x, int y)); // expected-warning {{type specifier missing, defaults to 'int'}} - void g4(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}} - - - void (*h1)(void (*f1)(__attribute__(()) int x)); - void (*h2)(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}} - --void (*h3)(void (*f3)(__attribute__(()) x)); // expected-error {{type specifier missing, defaults to 'int'}} -+void (*h3)(void (*f3)(__attribute__(()) x)); // expected-warning {{type specifier missing, defaults to 'int'}} - void (*h4)(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}} - - -diff --git a/clang/test/Parser/declarators.c b/clang/test/Parser/declarators.c -index c294bd085366..92cba09cdbbf 100644 ---- a/clang/test/Parser/declarators.c -+++ b/clang/test/Parser/declarators.c -@@ -6,7 +6,7 @@ void f0(); /* expected-warning {{a function declaration without a prototype is d - void f1(int [*]); - void f2(int [const *]); - void f3(int [volatile const*]); --int f4(*XX)(void); /* expected-error {{cannot return}} expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} */ -+int f4(*XX)(void); /* expected-error {{cannot return}} expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} */ - int f5(int [static]); /* expected-error {{'static' may not be used without an array size}} */ - - char ((((*X)))); -@@ -64,9 +64,9 @@ struct xyz test8(void) { return a; } // a should be be marked invalid, no diag. - - - // Verify that implicit int still works. --static f; // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} --static g = 4; // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} --static h // expected-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+static f; // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+static g = 4; // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} -+static h // expected-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} - __asm__("foo"); - - -diff --git a/clang/test/Parser/objc-forcollection-neg-2.m b/clang/test/Parser/objc-forcollection-neg-2.m -index e28b74f3f442..f95dd1356bc3 100644 ---- a/clang/test/Parser/objc-forcollection-neg-2.m -+++ b/clang/test/Parser/objc-forcollection-neg-2.m -@@ -24,7 +24,7 @@ typedef struct objc_object { - - @implementation MyList (BasicTest) - - (void)compilerTestAgainst { -- static i;// expected-error {{type specifier missing, defaults to 'int'}} -+ static i;// expected-warning {{type specifier missing, defaults to 'int'}} - for (id el, elem in self) // expected-error {{only one element declaration is allowed}} - ++i; - for (id el in self) -diff --git a/clang/test/Preprocessor/macro_paste_msextensions.c b/clang/test/Preprocessor/macro_paste_msextensions.c -index 1549ff5e5562..dcc5336b91c1 100644 ---- a/clang/test/Preprocessor/macro_paste_msextensions.c -+++ b/clang/test/Preprocessor/macro_paste_msextensions.c -@@ -32,7 +32,7 @@ nested(baz) rise of the dead tokens - // rdar://8197149 - VC++ allows invalid token pastes: (##baz - #define foo(x) abc(x) - #define bar(y) foo(##baz(y)) --bar(q) // expected-error {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}} -+bar(q) // expected-warning {{type specifier missing}} expected-error {{invalid preprocessing token}} expected-error {{parameter list without types}} - - // CHECK: abc(baz(q)) - -diff --git a/clang/test/Sema/__try.c b/clang/test/Sema/__try.c -index 9bfd914c013c..d0b2164198a2 100644 ---- a/clang/test/Sema/__try.c -+++ b/clang/test/Sema/__try.c -@@ -50,7 +50,7 @@ void TEST(void) { - } // expected-error{{expected '__except' or '__finally' block}} - - void TEST(void) { -- __except (FilterExpression()) { // expected-error{{call to undeclared function '__except'; ISO C99 and later do not support implicit function declarations}} \ -+ __except (FilterExpression()) { // expected-warning{{call to undeclared function '__except'; ISO C99 and later do not support implicit function declarations}} \ - // expected-error{{too few arguments to function call, expected 1, have 0}} \ - // expected-error{{expected ';' after expression}} - } -diff --git a/clang/test/Sema/aarch64-tme-errors.c b/clang/test/Sema/aarch64-tme-errors.c -index 26e931b62bcb..63ce87f3dc6b 100644 ---- a/clang/test/Sema/aarch64-tme-errors.c -+++ b/clang/test/Sema/aarch64-tme-errors.c -@@ -3,6 +3,6 @@ - #include "arm_acle.h" - - void test_no_tme_funcs(void) { -- __tstart(); // expected-error{{call to undeclared function '__tstart'; ISO C99 and later do not support implicit function declarations}} -+ __tstart(); // expected-warning{{call to undeclared function '__tstart'; ISO C99 and later do not support implicit function declarations}} - __builtin_tstart(); // expected-error{{use of unknown builtin '__builtin_tstart'}} - } -diff --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c -index ff7a134e04eb..085bef9b72d3 100644 ---- a/clang/test/Sema/address_spaces.c -+++ b/clang/test/Sema/address_spaces.c -@@ -9,7 +9,7 @@ void bar(_AS2 int a); // expected-error {{parameter may not be qualified with an - void foo(_AS3 float *a, - _AS1 float b) // expected-error {{parameter may not be qualified with an address space}} - { -- _AS2 *x;// expected-error {{type specifier missing, defaults to 'int'}} -+ _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} - _AS1 float * _AS2 *B; - - int _AS1 _AS2 *Y; // expected-error {{multiple address spaces specified for type}} -diff --git a/clang/test/Sema/auto-type.c b/clang/test/Sema/auto-type.c -index 1170c687c96a..bc845e37c2ae 100644 ---- a/clang/test/Sema/auto-type.c -+++ b/clang/test/Sema/auto-type.c -@@ -37,7 +37,7 @@ void Issue53652(void) { - - // GCC does not accept this either, for the same reason. - _Atomic(__auto_type) aat2 = a; // expected-error {{'__auto_type' not allowed here}} \ -- // expected-error {{type specifier missing, defaults to 'int'}} -+ // expected-warning {{type specifier missing, defaults to 'int'}} - - // Ensure the types are what we expect them to be, regardless of order we - // pass the types. -diff --git a/clang/test/Sema/bitfield.c b/clang/test/Sema/bitfield.c -index 468fe93485cc..b2982515da4d 100644 ---- a/clang/test/Sema/bitfield.c -+++ b/clang/test/Sema/bitfield.c -@@ -84,5 +84,5 @@ struct Test6 { - }; - - struct PR36157 { -- int n : 1 ? 1 : implicitly_declare_function(); // expected-error {{call to undeclared function 'implicitly_declare_function'; ISO C99 and later do not support implicit function declarations}} -+ int n : 1 ? 1 : implicitly_declare_function(); // expected-warning {{call to undeclared function 'implicitly_declare_function'; ISO C99 and later do not support implicit function declarations}} - }; -diff --git a/clang/test/Sema/block-args.c b/clang/test/Sema/block-args.c -index 1e000abf4b36..245b2c02b806 100644 ---- a/clang/test/Sema/block-args.c -+++ b/clang/test/Sema/block-args.c -@@ -37,7 +37,7 @@ void f0(void) { - - // rdar://problem/8962770 - void test4(void) { -- int (^f)(void) = ^((x)) { }; // expected-error {{type specifier missing}} expected-error {{type-id cannot have a name}} -+ int (^f)(void) = ^((x)) { }; // expected-warning {{type specifier missing}} expected-error {{type-id cannot have a name}} - } - - // rdar://problem/9170609 -diff --git a/clang/test/Sema/block-literal.c b/clang/test/Sema/block-literal.c -index b760c647f0d1..4cb96fb49092 100644 ---- a/clang/test/Sema/block-literal.c -+++ b/clang/test/Sema/block-literal.c -@@ -41,7 +41,7 @@ void test2(void) { - - foo: - takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} -- __block y = 7; // expected-error {{type specifier missing, defaults to 'int'}} -+ __block y = 7; // expected-warning {{type specifier missing, defaults to 'int'}} - takeblock(^{ y = 8; }); - } - -diff --git a/clang/test/Sema/builtin-setjmp.c b/clang/test/Sema/builtin-setjmp.c -index 5092d1665c19..94cd2652d0ab 100644 ---- a/clang/test/Sema/builtin-setjmp.c -+++ b/clang/test/Sema/builtin-setjmp.c -@@ -35,10 +35,10 @@ void use(void) { - setjmp(0); - #if NO_SETJMP - // cxx-error@-2 {{undeclared identifier 'setjmp'}} -- // c-error@-3 {{call to undeclared function 'setjmp'; ISO C99 and later do not support implicit function declarations}} -+ // c-warning@-3 {{call to undeclared function 'setjmp'; ISO C99 and later do not support implicit function declarations}} - #elif ONLY_JMP_BUF - // cxx-error@-5 {{undeclared identifier 'setjmp'}} -- // c-error@-6 {{call to undeclared library function 'setjmp' with type 'int (jmp_buf)' (aka 'int (int *)'); ISO C99 and later do not support implicit function declarations}} -+ // c-warning@-6 {{call to undeclared library function 'setjmp' with type 'int (jmp_buf)' (aka 'int (int *)'); ISO C99 and later do not support implicit function declarations}} - // c-note@-7 {{include the header or explicitly provide a declaration for 'setjmp'}} - #else - // cxx-no-diagnostics -diff --git a/clang/test/Sema/builtins.c b/clang/test/Sema/builtins.c -index 702b40c63767..b3ef004bec0f 100644 ---- a/clang/test/Sema/builtins.c -+++ b/clang/test/Sema/builtins.c -@@ -206,9 +206,9 @@ void test18(void) { - } - - void no_ms_builtins(void) { -- __assume(1); // expected-error {{call to undeclared function '__assume'; ISO C99 and later do not support implicit function declarations}} -- __noop(1); // expected-error {{call to undeclared function '__noop'; ISO C99 and later do not support implicit function declarations}} -- __debugbreak(); // expected-error {{call to undeclared function '__debugbreak'; ISO C99 and later do not support implicit function declarations}} -+ __assume(1); // expected-warning {{call to undeclared function '__assume'; ISO C99 and later do not support implicit function declarations}} -+ __noop(1); // expected-warning {{call to undeclared function '__noop'; ISO C99 and later do not support implicit function declarations}} -+ __debugbreak(); // expected-warning {{call to undeclared function '__debugbreak'; ISO C99 and later do not support implicit function declarations}} - } - - void unavailable(void) { -diff --git a/clang/test/Sema/crash-invalid-builtin.c b/clang/test/Sema/crash-invalid-builtin.c -index 26e5888a9e30..8f749f7b32bb 100644 ---- a/clang/test/Sema/crash-invalid-builtin.c -+++ b/clang/test/Sema/crash-invalid-builtin.c -@@ -1,4 +1,4 @@ - // RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s - // PR23086 - --__builtin_isinf(...); // expected-error {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{cannot redeclare builtin function '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}} -+__builtin_isinf(...); // expected-warning {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{cannot redeclare builtin function '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}} -diff --git a/clang/test/Sema/cxx-as-c.c b/clang/test/Sema/cxx-as-c.c -index a5d1a4944c95..41d7350d1f15 100644 ---- a/clang/test/Sema/cxx-as-c.c -+++ b/clang/test/Sema/cxx-as-c.c -@@ -2,7 +2,7 @@ - - // PR36157 - struct Foo { -- Foo(int n) : n_(n) {} // expected-error 1+{{}} -+ Foo(int n) : n_(n) {} // expected-error 1+{{}} expected-warning 1+{{}} - private: - int n; - }; -diff --git a/clang/test/Sema/function.c b/clang/test/Sema/function.c -index 1143fe8f50d5..43c8a6c8662b 100644 ---- a/clang/test/Sema/function.c -+++ b/clang/test/Sema/function.c -@@ -18,7 +18,7 @@ void h (const char *fmt, ...) {} // expected-error{{conflicting types for 'h'}} - - // PR1965 - int t5(b); // expected-error {{parameter list without types}} --int t6(int x, g); // expected-error {{type specifier missing, defaults to 'int'}} -+int t6(int x, g); // expected-warning {{type specifier missing, defaults to 'int'}} - - int t7(, ); // expected-error {{expected parameter declarator}} expected-error {{expected parameter declarator}} - int t8(, int a); // expected-error {{expected parameter declarator}} -@@ -41,8 +41,8 @@ int t14() { - } - - // --y(y) { return y; } // expected-error{{parameter 'y' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -- // expected-error{{type specifier missing, defaults to 'int'}} -+y(y) { return y; } // expected-warning{{parameter 'y' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ // expected-warning{{type specifier missing, defaults to 'int'}} - - - // PR3137, -diff --git a/clang/test/Sema/implicit-builtin-decl.c b/clang/test/Sema/implicit-builtin-decl.c -index 055ba7e70eb1..a54e652556c3 100644 ---- a/clang/test/Sema/implicit-builtin-decl.c -+++ b/clang/test/Sema/implicit-builtin-decl.c -@@ -1,7 +1,7 @@ - // RUN: %clang_cc1 -fsyntax-only -Wno-strict-prototypes -verify %s - - void f() { -- int *ptr = malloc(sizeof(int) * 10); // expected-error{{call to undeclared library function 'malloc' with type}} \ -+ int *ptr = malloc(sizeof(int) * 10); // expected-warning{{call to undeclared library function 'malloc' with type}} \ - // expected-note{{include the header or explicitly provide a declaration for 'malloc'}} \ - // expected-note{{'malloc' is a builtin with type 'void *}} - } -@@ -24,7 +24,7 @@ void h() { - - void f2() { - fprintf(0, "foo"); // expected-warning{{declaration of built-in function 'fprintf' requires inclusion of the header }} \ -- expected-error {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}} -+ expected-warning {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}} - } - - // PR2892 -diff --git a/clang/test/Sema/implicit-decl.c b/clang/test/Sema/implicit-decl.c -index 351f70ea3366..ce26dcd3a122 100644 ---- a/clang/test/Sema/implicit-decl.c -+++ b/clang/test/Sema/implicit-decl.c -@@ -1,55 +1,60 @@ --// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror=implicit-function-declaration -std=c99 --// RUN: %clang_cc1 %s -verify -fsyntax-only -std=c11 -+// RUN: %clang_cc1 %s -verify=werror,both -fsyntax-only -Werror=implicit-function-declaration -std=c99 -+// RUN: %clang_cc1 %s -verify=expected,both -fsyntax-only -std=c11 - // RUN: %clang_cc1 %s -verify=c2x -fsyntax-only -std=c2x - - /// -Werror-implicit-function-declaration is a deprecated alias used by many projects. --// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror-implicit-function-declaration -+// RUN: %clang_cc1 %s -verify=werror,both -fsyntax-only -Werror-implicit-function-declaration - - // c2x-note@*:* {{'__builtin_va_list' declared here}} - - typedef int int32_t; - typedef unsigned char Boolean; - --extern int printf(__const char *__restrict __format, ...); // expected-note{{'printf' declared here}} \ -+extern int printf(__const char *__restrict __format, ...); // werror-note{{'printf' declared here}} \ - c2x-note {{'printf' declared here}} - - void func(void) { - int32_t *vector[16]; - const char compDesc[16 + 1]; - int32_t compCount = 0; -- if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-error {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note {{previous implicit declaration}} \ -+ if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // werror-error {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ -+ both-note {{previous implicit declaration}} \ -+ expected-warning {{call to undeclared function '_CFCalendarDecomposeAbsoluteTimeV'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier '_CFCalendarDecomposeAbsoluteTimeV'}} - } - -- printg("Hello, World!\n"); // expected-error{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note{{did you mean 'printf'?}} \ -+ printg("Hello, World!\n"); // werror-error{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ -+ werror-note{{did you mean 'printf'?}} \ -+ expected-warning{{call to undeclared function 'printg'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'printg'; did you mean 'printf'?}} - -- __builtin_is_les(1, 3); // expected-error{{use of unknown builtin '__builtin_is_les'}} \ -+ __builtin_is_les(1, 3); // both-error{{use of unknown builtin '__builtin_is_les'}} \ - c2x-error {{unknown type name '__builtin_is_les'; did you mean '__builtin_va_list'?}} \ - c2x-error {{expected identifier or '('}} \ - c2x-error {{expected ')'}} \ - c2x-note {{to match this '('}} - } --Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // expected-error {{conflicting types}} -+Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // both-error {{conflicting types}} - return 0; - } - - - // Test the typo-correction callback in Sema::ImplicitlyDefineFunction --extern int sformatf(char *str, __const char *__restrict __format, ...); // expected-note{{'sformatf' declared here}} -+extern int sformatf(char *str, __const char *__restrict __format, ...); // werror-note{{'sformatf' declared here}} - void test_implicit(void) { - int formats = 0; // c2x-note {{'formats' declared here}} -- formatd("Hello, World!\n"); // expected-error{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ -- expected-note{{did you mean 'sformatf'?}} \ -+ formatd("Hello, World!\n"); // werror-error{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ -+ werror-note{{did you mean 'sformatf'?}} \ -+ expected-warning{{call to undeclared function 'formatd'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'formatd'; did you mean 'formats'?}} \ - c2x-error {{called object type 'int' is not a function or function pointer}} - } - - void test_suggestion(void) { -- bark(); // expected-error {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ -+ bark(); // werror-error {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ -+ expected-warning {{call to undeclared function 'bark'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'bark'}} -- bork(); // expected-error {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ -+ bork(); // werror-error {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ -+ expected-warning {{call to undeclared function 'bork'; ISO C99 and later do not support implicit function declarations}} \ - c2x-error {{use of undeclared identifier 'bork'}} - } -diff --git a/clang/test/Sema/implicit-int.c b/clang/test/Sema/implicit-int.c -index 477cd6977375..a5578cd0f65b 100644 ---- a/clang/test/Sema/implicit-int.c -+++ b/clang/test/Sema/implicit-int.c -@@ -4,18 +4,18 @@ - */ - - foo(void) { /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - return 0; - } - - y; /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - - /* rdar://6131634 */ - void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - - /* PR3702 */ -@@ -26,18 +26,18 @@ void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} - #define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */ - - void --h19_insline(n) /* ext-error {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+h19_insline(n) /* ext-warning {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{unknown type name 'n'}} */ - { - ILPAD(); /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{a type specifier is required for all declarations}} */ - - } - - struct foo { - __extension__ __attribute__((packed)) x : 4; /* expected-warning {{type specifier missing, defaults to 'int'}} \ -- ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ -+ ext-warning {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \ - unsupported-error {{unknown type name 'x'}} */ - - }; -diff --git a/clang/test/Sema/implicit-intel-builtin-decl.c b/clang/test/Sema/implicit-intel-builtin-decl.c -index e7d17d9f19b9..1015d9bfe026 100644 ---- a/clang/test/Sema/implicit-intel-builtin-decl.c -+++ b/clang/test/Sema/implicit-intel-builtin-decl.c -@@ -3,26 +3,26 @@ - - void f(void) { - (void)_mm_getcsr(); // cxx-warning{{implicitly declaring library function '_mm_getcsr'}} \ -- c-error{{call to undeclared library function '_mm_getcsr'}} \ -+ c-warning{{call to undeclared library function '_mm_getcsr'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_getcsr'}} - _mm_setcsr(1); // cxx-warning{{implicitly declaring library function '_mm_setcsr'}} \ -- c-error{{call to undeclared library function '_mm_setcsr'}} \ -+ c-warning{{call to undeclared library function '_mm_setcsr'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_setcsr'}} - _mm_sfence(); // cxx-warning{{implicitly declaring library function '_mm_sfence'}} \ -- c-error{{call to undeclared library function '_mm_sfence'}} \ -+ c-warning{{call to undeclared library function '_mm_sfence'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_sfence'}} - - _mm_clflush((void*)0); // cxx-warning{{implicitly declaring library function '_mm_clflush'}} \ -- c-error{{call to undeclared library function '_mm_clflush'}} \ -+ c-warning{{call to undeclared library function '_mm_clflush'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_clflush'}} - _mm_lfence(); // cxx-warning{{implicitly declaring library function '_mm_lfence'}} \ -- c-error{{call to undeclared library function '_mm_lfence'}} \ -+ c-warning{{call to undeclared library function '_mm_lfence'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_lfence'}} - _mm_mfence(); // cxx-warning{{implicitly declaring library function '_mm_mfence'}} \ -- c-error{{call to undeclared library function '_mm_mfence'}} \ -+ c-warning{{call to undeclared library function '_mm_mfence'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_mfence'}} - _mm_pause(); // cxx-warning{{implicitly declaring library function '_mm_pause'}} \ -- c-error{{call to undeclared library function '_mm_pause'}} \ -+ c-warning{{call to undeclared library function '_mm_pause'}} \ - expected-note{{include the header or explicitly provide a declaration for '_mm_pause'}} - } - -diff --git a/clang/test/Sema/implicit-ms-builtin-decl.c b/clang/test/Sema/implicit-ms-builtin-decl.c -index 1294bb6aa9aa..6bb2f6e3b8e2 100644 ---- a/clang/test/Sema/implicit-ms-builtin-decl.c -+++ b/clang/test/Sema/implicit-ms-builtin-decl.c -@@ -2,9 +2,9 @@ - // RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -verify %s -fms-extensions - - void f(void) { -- (void)_byteswap_ushort(42); // expected-error{{call to undeclared library function '_byteswap_ushort'}} \ -+ (void)_byteswap_ushort(42); // expected-warning{{call to undeclared library function '_byteswap_ushort'}} \ - // expected-note{{include the header or explicitly provide a declaration for '_byteswap_ushort'}} -- (void)_byteswap_uint64(42LL); // expected-error{{call to undeclared library function '_byteswap_uint64'}} \ -+ (void)_byteswap_uint64(42LL); // expected-warning{{call to undeclared library function '_byteswap_uint64'}} \ - // expected-note{{include the header or explicitly provide a declaration for '_byteswap_uint64'}} - } - -@@ -21,9 +21,9 @@ void g(void) { - - #if defined(__x86_64__) - void h(void) { -- (void)__mulh(21, 2); // expected-error{{call to undeclared library function '__mulh'}} \ -+ (void)__mulh(21, 2); // expected-warning{{call to undeclared library function '__mulh'}} \ - // expected-note{{include the header or explicitly provide a declaration for '__mulh'}} -- (void)__umulh(21, 2); // expected-error{{call to undeclared library function '__umulh'}} \ -+ (void)__umulh(21, 2); // expected-warning{{call to undeclared library function '__umulh'}} \ - // expected-note{{include the header or explicitly provide a declaration for '__umulh'}} - } - -@@ -38,7 +38,7 @@ void i(void) { - - #if defined(i386) - void h(void) { -- (void)__mulh(21LL, 2LL); // expected-error{{call to undeclared function '__mulh'; ISO C99 and later do not support implicit function declarations}} -- (void)__umulh(21ULL, 2ULL); // expected-error{{call to undeclared function '__umulh'; ISO C99 and later do not support implicit function declarations}} -+ (void)__mulh(21LL, 2LL); // expected-warning{{call to undeclared function '__mulh'; ISO C99 and later do not support implicit function declarations}} -+ (void)__umulh(21ULL, 2ULL); // expected-warning{{call to undeclared function '__umulh'; ISO C99 and later do not support implicit function declarations}} - } - #endif -diff --git a/clang/test/Sema/invalid-decl.c b/clang/test/Sema/invalid-decl.c -index 4f2680074dcd..ca5fa124e802 100644 ---- a/clang/test/Sema/invalid-decl.c -+++ b/clang/test/Sema/invalid-decl.c -@@ -6,7 +6,7 @@ void test(void) { - - - // PR2400 --typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-error 2{{type specifier missing, defaults to 'int'}} -+typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-warning 2{{type specifier missing, defaults to 'int'}} - - typedef void ytype(); - -diff --git a/clang/test/Sema/invalid-struct-init.c b/clang/test/Sema/invalid-struct-init.c -index 72f6bbae12ab..0dd00b55ea21 100644 ---- a/clang/test/Sema/invalid-struct-init.c -+++ b/clang/test/Sema/invalid-struct-init.c -@@ -3,7 +3,7 @@ - typedef struct _zend_module_entry zend_module_entry; - struct _zend_module_entry { - _efree((p)); // expected-error{{type name requires a specifier or qualifier}} \ -- expected-error {{type specifier missing, defaults to 'int'}} -+ expected-warning {{type specifier missing, defaults to 'int'}} - - }; - typedef struct _zend_function_entry { } zend_function_entry; -diff --git a/clang/test/Sema/redefinition.c b/clang/test/Sema/redefinition.c -index 7e690e1a917d..28f7f02bb251 100644 ---- a/clang/test/Sema/redefinition.c -+++ b/clang/test/Sema/redefinition.c -@@ -4,7 +4,7 @@ int f(int); - int f(int a) { return 0; } // expected-error {{redefinition of 'f'}} - - // --int foo(x) { // expected-error {{parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} -+int foo(x) { // expected-warning {{parameter 'x' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} - return 0; - } - int x = 1; -diff --git a/clang/test/Sema/typo-correction.c b/clang/test/Sema/typo-correction.c -index ceab0e2634c5..4048488528d4 100644 ---- a/clang/test/Sema/typo-correction.c -+++ b/clang/test/Sema/typo-correction.c -@@ -10,11 +10,11 @@ void PR21656(void) { - x = (float)arst; // expected-error-re {{use of undeclared identifier 'arst'{{$}}}} - } - --a = b ? : 0; // expected-error {{type specifier missing, defaults to 'int'}} \ -+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}} --new_a = goobar ?: 4; // expected-error {{type specifier missing, defaults to 'int'}} \ -+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}} - -@@ -37,7 +37,7 @@ int c11Generic(int arg) { - - typedef long long __m128i __attribute__((__vector_size__(16))); - int PR23101(__m128i __x) { -- return foo((__v2di)__x); // expected-error {{call to undeclared function 'foo'; ISO C99 and later do not support implicit function declarations}} \ -+ return foo((__v2di)__x); // expected-warning {{call to undeclared function 'foo'; ISO C99 and later do not support implicit function declarations}} \ - // expected-error {{use of undeclared identifier '__v2di'}} - } - -diff --git a/clang/test/Sema/varargs.c b/clang/test/Sema/varargs.c -index 2cb7270f604a..ebab2c9cd8b5 100644 ---- a/clang/test/Sema/varargs.c -+++ b/clang/test/Sema/varargs.c -@@ -114,7 +114,7 @@ void f13(enum E1 e, ...) { - } - - void f14(int e, ...) { -- // expected-error@+3 {{call to undeclared library function 'va_start'}} -+ // expected-warning@+3 {{call to undeclared library function 'va_start'}} - // expected-note@+2 {{include the header }} - // expected-error@+1 {{too few arguments to function call}} - va_start(); -diff --git a/clang/test/Sema/vla.c b/clang/test/Sema/vla.c -index c6d61aac4515..73e24e90beea 100644 ---- a/clang/test/Sema/vla.c -+++ b/clang/test/Sema/vla.c -@@ -72,7 +72,7 @@ int TransformBug(int a) { - // PR36157 - struct { - int a[ // expected-error {{variable length array in struct}} -- implicitly_declared() // expected-error {{call to undeclared function 'implicitly_declared'; ISO C99 and later do not support implicit function declarations}} -+ implicitly_declared() // expected-warning {{call to undeclared function 'implicitly_declared'; ISO C99 and later do not support implicit function declarations}} - ]; - }; - int (*use_implicitly_declared)(void) = implicitly_declared; // ok, was implicitly declared at file scope -diff --git a/clang/test/SemaObjC/builtin_objc_lib_functions.m b/clang/test/SemaObjC/builtin_objc_lib_functions.m -index 211c47246460..bda2f62678c0 100644 ---- a/clang/test/SemaObjC/builtin_objc_lib_functions.m -+++ b/clang/test/SemaObjC/builtin_objc_lib_functions.m -@@ -1,29 +1,29 @@ - // RUN: %clang_cc1 -x objective-c %s -fsyntax-only -verify - // rdar://8592641 --Class f0(void) { return objc_getClass("a"); } // expected-error {{call to undeclared library function 'objc_getClass' with type 'id (const char *)'}} \ -+Class f0(void) { return objc_getClass("a"); } // expected-warning {{call to undeclared library function 'objc_getClass' with type 'id (const char *)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_getClass'}} - - // rdar://8735023 --Class f1(void) { return objc_getMetaClass("a"); } // expected-error {{call to undeclared library function 'objc_getMetaClass' with type 'id (const char *)'}} \ -+Class f1(void) { return objc_getMetaClass("a"); } // expected-warning {{call to undeclared library function 'objc_getMetaClass' with type 'id (const char *)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_getMetaClass'}} - --void f2(id val) { objc_enumerationMutation(val); } // expected-error {{call to undeclared library function 'objc_enumerationMutation' with type 'void (id)'}} \ -+void f2(id val) { objc_enumerationMutation(val); } // expected-warning {{call to undeclared library function 'objc_enumerationMutation' with type 'void (id)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_enumerationMutation'}} - --long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-error {{call to undeclared library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \ -+long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-warning {{call to undeclared library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_msgSend_fpret'}} - - id f4(struct objc_super *super, SEL op) { // expected-warning {{declaration of 'struct objc_super' will not be visible outside of this function}} -- return objc_msgSendSuper(super, op); // expected-error {{call to undeclared library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \ -+ return objc_msgSendSuper(super, op); // expected-warning {{call to undeclared library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_msgSendSuper'}} - } - - id f5(id val, id *dest) { -- return objc_assign_strongCast(val, dest); // expected-error {{call to undeclared library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \ -+ return objc_assign_strongCast(val, dest); // expected-warning {{call to undeclared library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_assign_strongCast'}} - } - - int f6(Class exceptionClass, id exception) { -- return objc_exception_match(exceptionClass, exception); // expected-error {{call to undeclared library function 'objc_exception_match' with type 'int (id, id)'}} \ -+ return objc_exception_match(exceptionClass, exception); // expected-warning {{call to undeclared library function 'objc_exception_match' with type 'int (id, id)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'objc_exception_match'}} - } -diff --git a/clang/test/SemaObjC/builtin_objc_nslog.m b/clang/test/SemaObjC/builtin_objc_nslog.m -index 3c35a02d9b8a..ad7873fe1d47 100644 ---- a/clang/test/SemaObjC/builtin_objc_nslog.m -+++ b/clang/test/SemaObjC/builtin_objc_nslog.m -@@ -3,11 +3,11 @@ - #include - - void f1(id arg) { -- NSLog(@"%@", arg); // expected-error {{call to undeclared library function 'NSLog' with type 'void (id, ...)'}} \ -+ NSLog(@"%@", arg); // expected-warning {{call to undeclared library function 'NSLog' with type 'void (id, ...)'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'NSLog'}} - } - - void f2(id str, va_list args) { -- NSLogv(@"%@", args); // expected-error {{call to undeclared library function 'NSLogv' with type }} \ -+ NSLogv(@"%@", args); // expected-warning {{call to undeclared library function 'NSLogv' with type }} \ - // expected-note {{include the header or explicitly provide a declaration for 'NSLogv'}} - } -diff --git a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m -index 09d69aca9f93..bbb1b4f6a168 100644 ---- a/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m -+++ b/clang/test/SemaObjC/ivar-lookup-resolution-builtin.m -@@ -28,7 +28,7 @@ - @implementation Test1 - - (int) InstMethod - { -- return index; // expected-error {{call to undeclared library function 'index'}} \ -+ return index; // expected-warning {{call to undeclared library function 'index'}} \ - // expected-note {{include the header or explicitly provide a declaration for 'index'}} \ - // expected-error {{incompatible pointer to integer conversion returning}} - } -diff --git a/clang/test/SemaObjC/protocols.m b/clang/test/SemaObjC/protocols.m -index ebb9b634b4b6..eb2734100769 100644 ---- a/clang/test/SemaObjC/protocols.m -+++ b/clang/test/SemaObjC/protocols.m -@@ -62,6 +62,6 @@ - @end - - @protocol P --- (int)test:(int)param, ..; // expected-error{{type specifier missing}} \ -+- (int)test:(int)param, ..; // expected-warning{{type specifier missing}} \ - // expected-error{{expected ';' after method prototype}} - @end -diff --git a/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl b/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl -index 2ea6d3bc4862..9e2869af87b4 100644 ---- a/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl -+++ b/clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl -@@ -10,7 +10,7 @@ void foo(read_only pipe int p); - // expected-error@-5 {{C++ for OpenCL version 2021 does not support the 'pipe' type qualifier}} - // expected-error@-6 {{access qualifier can only be used for pipe and image type}} - #else --// expected-error@-8 {{type specifier missing, defaults to 'int'}} -+// expected-warning@-8 {{type specifier missing, defaults to 'int'}} - // expected-error@-9 {{access qualifier can only be used for pipe and image type}} - // expected-error@-10 {{expected ')'}} expected-note@-10 {{to match this '('}} - #endif --- -2.37.2 - diff --git a/clang.spec b/clang.spec index 88ac031..c25c449 100644 --- a/clang.spec +++ b/clang.spec @@ -5,7 +5,7 @@ %global maj_ver 15 %global min_ver 0 -%global patch_ver 0 +%global patch_ver 4 #global rc_ver 3 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -41,7 +41,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Release: 1%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -68,10 +68,6 @@ Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch -# Backport of https://reviews.llvm.org/D133800 to the 15.0.0 release. -# TODO: Drop once updating to 15.0.1 or newer. -Patch7: 0001-Clang-15.0.1-Downgrade-implicit-int-and-implicit-fun.patch - %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -461,6 +457,10 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format %check %if %{without compat_build} %if %{with check} +# Build test dependencies separately, to prevent invocations of host clang from being affected +# by LD_LIBRARY_PATH below. +%cmake_build --target clang-test-depends \ + ExtraToolsUnitTests ClangdUnitTests ClangIncludeCleanerUnitTests ClangPseudoUnitTests # requires lit.py from LLVM utilities # FIXME: Fix failing ARM tests LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \ @@ -593,8 +593,8 @@ false %endif %changelog -* Thu Oct 13 2022 Nikita Popov - 15.0.0-3 -- Default to non-pie, fix rhbz#2134146 +* Tue Nov 08 2022 Nikita Popov - 15.0.4-1 +- Update to LLVM 15.0.4 * Wed Sep 14 2022 Nikita Popov - 15.0.0-2 - Downgrade implicit int and implicit function declaration to warning only diff --git a/sources b/sources index 4ace6b5..d222b90 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clang-tools-extra-15.0.0.src.tar.xz) = 74e42df5a5496eacb69f172ac77a33fdf19be63cdab22c6bf5f7a9acdf9742bd48f8ee791cdf8bb14c17df9ba1e3b07c6e95ac68c62e4180acbd510fa971da49 -SHA512 (clang-tools-extra-15.0.0.src.tar.xz.sig) = b6adbffa21483f125fbe2712d7d20df9be2d05ea354f170b5d08f80499fdcf2eb37a4f2e5781dfdce124687fb94935f535aea37ff2d5ab6d81ffe88324a9272f -SHA512 (clang-15.0.0.src.tar.xz) = cf6eab1bd4623e0bcf844839f5008ec49f83c9b4eb145de21798125a2c8798909007ed7c74a2ade1eed4b210a62750411b8dcad37263148a5ffca81988cf7dc4 -SHA512 (clang-15.0.0.src.tar.xz.sig) = 6c15f4783512c402079af42f1ae55a9d3e03f622bbda5bd789e8902ef03a365d75d3765d4bf50975a75f116e72e780a5226ab2ad3e145c83a1cbf65fdee8d271 +SHA512 (clang-tools-extra-15.0.4.src.tar.xz) = a9969a55449a6d6eecab5bda071304c0cb804674795b643a53ad113b96bf5382678270bde47f1cd061b88156e3477ab2932f1c8e8926b7eb84dc7683341ce6e9 +SHA512 (clang-tools-extra-15.0.4.src.tar.xz.sig) = 561bd572e8ce702e558bda37bd9739ceabc61865c65419ab8f575e45f75f4c244eb9617a1595b2379625c2a5649a3dd52aa66662505b294731f02663e303a7dd +SHA512 (clang-15.0.4.src.tar.xz) = 408061a0331799e8d6313dea75ba8f811daea43277b3d3f078daa694bc7e9eb9dbe9060824f6281417ca6804498359c5a8195f5a6c1949eaa3a9bab0e8c11649 +SHA512 (clang-15.0.4.src.tar.xz.sig) = 7c41fcf79218e30b6f37114bcb0b778c62de8e4fefe9889143de9a689d422b4ee50de49b7a50109cd21daea056e4eefb6f6de121889dfe40f4ef9a593758dde3 From 39fa8f2089bf482a28aa4c7922ef0716857fd833 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 12 Sep 2022 11:53:59 +0200 Subject: [PATCH 3/3] Migrate tests to tests/clang repo --- tests/README.md | 6 ++ tests/build-gating-libomp.fmf | 37 ------- tests/build-gating-pocl.fmf | 2 + tests/build-gating.fmf | 6 +- tests/clang-format-diff/main.fmf | 15 --- tests/clang-format-diff/test.sh | 5 - tests/fedora-flags/hello.c | 5 - tests/fedora-flags/hello.cpp | 5 - tests/fedora-flags/main.c | 6 -- tests/fedora-flags/main.cpp | 6 -- tests/fedora-flags/main.fmf | 30 ------ tests/fedora-flags/test.sh | 20 ---- tests/libomp/main.fmf | 36 ------- tests/libomp/openmp-compile-link-test.c | 8 -- tests/libomp/test.sh | 7 -- tests/llvm-test-suite/main.fmf | 18 ---- tests/llvm-test-suite/test.sh | 7 -- tests/openmp-rpm/main.fmf | 30 ------ tests/openmp-rpm/runtest.sh | 6 -- tests/openmp-rpm/test.c | 7 -- tests/openmp-rpm/test.spec | 36 ------- tests/pocl/main.fmf | 24 ----- tests/pocl/test.sh | 7 -- tests/ppc64le-long-double/main.fmf | 33 ------- tests/ppc64le-long-double/runtest-fedora.sh | 14 --- tests/ppc64le-long-double/runtest.sh | 9 -- tests/rhbz_1647130/main.fmf | 19 ---- tests/rhbz_1647130/test.sh | 8 -- tests/rhbz_1657544/from_chars.cpp | 15 --- tests/rhbz_1657544/main.fmf | 16 --- tests/rhbz_1657544/test.sh | 4 - tests/rhbz_482491/main.fmf | 17 ---- tests/rhbz_482491/test.sh | 3 - tests/toolchains/hello.c | 5 - tests/toolchains/hello.cpp | 5 - tests/toolchains/main.fmf | 55 ----------- tests/toolchains/test.sh | 102 -------------------- tests/use-dwarf4-by-default/main.fmf | 20 ---- tests/use-dwarf4-by-default/test.sh | 7 -- 39 files changed, 12 insertions(+), 649 deletions(-) create mode 100644 tests/README.md delete mode 100644 tests/build-gating-libomp.fmf delete mode 100644 tests/clang-format-diff/main.fmf delete mode 100755 tests/clang-format-diff/test.sh delete mode 100644 tests/fedora-flags/hello.c delete mode 100644 tests/fedora-flags/hello.cpp delete mode 100644 tests/fedora-flags/main.c delete mode 100644 tests/fedora-flags/main.cpp delete mode 100644 tests/fedora-flags/main.fmf delete mode 100755 tests/fedora-flags/test.sh delete mode 100644 tests/libomp/main.fmf delete mode 100644 tests/libomp/openmp-compile-link-test.c delete mode 100755 tests/libomp/test.sh delete mode 100644 tests/llvm-test-suite/main.fmf delete mode 100755 tests/llvm-test-suite/test.sh delete mode 100644 tests/openmp-rpm/main.fmf delete mode 100755 tests/openmp-rpm/runtest.sh delete mode 100644 tests/openmp-rpm/test.c delete mode 100644 tests/openmp-rpm/test.spec delete mode 100644 tests/pocl/main.fmf delete mode 100755 tests/pocl/test.sh delete mode 100644 tests/ppc64le-long-double/main.fmf delete mode 100755 tests/ppc64le-long-double/runtest-fedora.sh delete mode 100755 tests/ppc64le-long-double/runtest.sh delete mode 100644 tests/rhbz_1647130/main.fmf delete mode 100755 tests/rhbz_1647130/test.sh delete mode 100644 tests/rhbz_1657544/from_chars.cpp delete mode 100644 tests/rhbz_1657544/main.fmf delete mode 100755 tests/rhbz_1657544/test.sh delete mode 100644 tests/rhbz_482491/main.fmf delete mode 100755 tests/rhbz_482491/test.sh delete mode 100644 tests/toolchains/hello.c delete mode 100644 tests/toolchains/hello.cpp delete mode 100644 tests/toolchains/main.fmf delete mode 100755 tests/toolchains/test.sh delete mode 100644 tests/use-dwarf4-by-default/main.fmf delete mode 100755 tests/use-dwarf4-by-default/test.sh diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..0f96d35 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,6 @@ +# Gating testplans for Clang + +The tests for clang are in a separate repo: https://src.fedoraproject.org/tests/clang +This directory should contain only fmf plans (such as build-gating.fmf) which import +the tests from the tests repo. This can be done using the "url" parameter of the +plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf \ No newline at end of file diff --git a/tests/build-gating-libomp.fmf b/tests/build-gating-libomp.fmf deleted file mode 100644 index 1ddd29e..0000000 --- a/tests/build-gating-libomp.fmf +++ /dev/null @@ -1,37 +0,0 @@ -summary: libomp clang tests for build/PR gating -adjust: - - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." - when: >- - trigger is defined - and trigger != commit - and trigger != build - enabled: false - - - because: "When testing SCL-ized LLVM, the collection must be enabled first" - environment+: - WITH_SCL: "scl enable llvm-toolset-13.0" - when: "collection == llvm-toolset-13.0" - - because: "When testing SCL-ized LLVM, the collection must be enabled first" - environment+: - WITH_SCL: "scl enable llvm-toolset-14.0" - when: "collection == llvm-toolset-14.0" - - - because: "libomp not supported in s390x" - when: arch == s390x - enabled: false - -discover: - how: fmf - test: libomp -execute: - how: tmt -prepare: - # We want to make sure libomp is not already present on the system to ensure - # that clang pulls in the correct libomp dependencies when it is installed. - - name: Drop libomp - how: shell - script: | - yum erase -y libomp libomp-devel clang clang-libs -provision: - hardware: - memory: ">= 4 GiB" diff --git a/tests/build-gating-pocl.fmf b/tests/build-gating-pocl.fmf index 4b74ced..6fda183 100644 --- a/tests/build-gating-pocl.fmf +++ b/tests/build-gating-pocl.fmf @@ -16,6 +16,8 @@ adjust: discover: how: fmf test: pocl + url: https://src.fedoraproject.org/tests/clang.git + ref: main execute: how: tmt prepare: diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf index b0b49be..ae4fdb3 100644 --- a/tests/build-gating.fmf +++ b/tests/build-gating.fmf @@ -50,11 +50,13 @@ adjust: discover: - name: clang-tests how: fmf + url: https://src.fedoraproject.org/tests/clang.git + ref: main filter: "tag:-not-in-default" - name: upstream-llvm-integration-testsuite how: fmf - url: https://src.fedoraproject.org/rpms/llvm.git - ref: rawhide + url: https://src.fedoraproject.org/tests/llvm.git + ref: main test: integration-test-suite execute: how: tmt diff --git a/tests/clang-format-diff/main.fmf b/tests/clang-format-diff/main.fmf deleted file mode 100644 index 06ed176..0000000 --- a/tests/clang-format-diff/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: clang-format-diff -test: "$WITH_SCL ./test.sh" -adjust: - # Common requirements when LLVM is not SCL-ized - - require: - - clang-tools-extra - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require: - - llvm-toolset-13.0-clang-tools-extra - when: "collection == llvm-toolset-13.0" - - require: - - llvm-toolset-14.0-clang-tools-extra - when: "collection == llvm-toolset-14.0" diff --git a/tests/clang-format-diff/test.sh b/tests/clang-format-diff/test.sh deleted file mode 100755 index d6fcb47..0000000 --- a/tests/clang-format-diff/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -eux - -# Check that clang-format-diff is in PATH. -# rhbz#1939018 -clang-format-diff -h diff --git a/tests/fedora-flags/hello.c b/tests/fedora-flags/hello.c deleted file mode 100644 index 51b259b..0000000 --- a/tests/fedora-flags/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - printf("Hello World\n"); -} diff --git a/tests/fedora-flags/hello.cpp b/tests/fedora-flags/hello.cpp deleted file mode 100644 index 400612b..0000000 --- a/tests/fedora-flags/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - std::cout << "Hello World\n"; -} diff --git a/tests/fedora-flags/main.c b/tests/fedora-flags/main.c deleted file mode 100644 index 1a3455d..0000000 --- a/tests/fedora-flags/main.c +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/fedora-flags/main.cpp b/tests/fedora-flags/main.cpp deleted file mode 100644 index 1a3455d..0000000 --- a/tests/fedora-flags/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/fedora-flags/main.fmf b/tests/fedora-flags/main.fmf deleted file mode 100644 index f2728ba..0000000 --- a/tests/fedora-flags/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: fedora-flags -test: "$WITH_SCL ./test.sh" -require: - - redhat-rpm-config -adjust: - - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" - - - because: s390x does not have epel repo which is required to provide rpm macros - enabled: false - when: >- - distro == rhel-7 - and arch == s390x - - # Note: this needs epel-release repo to be available - - because: "To enable rpm macros not available by default (e.g. build_cflags), epel-rpm-macros is needed" - require+: - - epel-rpm-macros - when: distro == rhel-7 diff --git a/tests/fedora-flags/test.sh b/tests/fedora-flags/test.sh deleted file mode 100755 index 75f674f..0000000 --- a/tests/fedora-flags/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -eux - -set pipefail - -cflags=`rpm -D '%toolchain clang' -E %{build_cflags}` -cxxflags=`rpm -D '%toolchain clang' -E %{build_cxxflags}` -ldflags=`rpm -D '%toolchain clang' -E %{build_ldflags}` - - -# Test a c program -clang $cflags -c hello.c -o hello.o -clang $cflags -c main.c -o main.o -clang $ldflags -o hello main.o hello.o -./hello | grep "Hello World" - -# Test a cxx program -clang++ $cxxflags -c hello.cpp -o hello-cpp.o -clang++ $cxxflags -c main.cpp -o main-cpp.o -clang++ $ldflags -o hello-cpp main-cpp.o hello-cpp.o -./hello-cpp | grep "Hello World" diff --git a/tests/libomp/main.fmf b/tests/libomp/main.fmf deleted file mode 100644 index 960bccb..0000000 --- a/tests/libomp/main.fmf +++ /dev/null @@ -1,36 +0,0 @@ -# TODO: get fitting summary - what's the purpose of this test? Comment from the STI version says: -# -# We want to make sure libomp is not already present on the system to ensure -# that clang pulls in the correct libomp dependencies when it is installed. -summary: libomp tests -# This test requires a special preparation, see `/tests/tests-libomp` plan. As such, -# it shouldn't be part of the `/tests/default` plan. -tag: - - not-in-default -test: "$WITH_SCL ./test.sh" -adjust: - - because: "libomp is not supported in s390x" - when: arch == s390x - enabled: false - - # Common requirements when LLVM is not SCL-ized - - require: - - clang - - clang-libs - - libomp - - libomp-devel - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-clang-libs - - llvm-toolset-13.0-libomp - - llvm-toolset-13.0-libomp-devel - when: "collection == llvm-toolset-13.0" - - require: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-libs - - llvm-toolset-14.0-libomp - - llvm-toolset-14.0-libomp-devel - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/libomp/openmp-compile-link-test.c b/tests/libomp/openmp-compile-link-test.c deleted file mode 100644 index a2b6004..0000000 --- a/tests/libomp/openmp-compile-link-test.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - int nthreads = omp_get_num_threads(); - printf("Num Threads: %d\n", nthreads); - return 0; -} diff --git a/tests/libomp/test.sh b/tests/libomp/test.sh deleted file mode 100755 index f07dbbc..0000000 --- a/tests/libomp/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -clang -fopenmp openmp-compile-link-test.c - -./a.out | grep "Num Threads: 1" diff --git a/tests/llvm-test-suite/main.fmf b/tests/llvm-test-suite/main.fmf deleted file mode 100644 index 7d61dfb..0000000 --- a/tests/llvm-test-suite/main.fmf +++ /dev/null @@ -1,18 +0,0 @@ -# TODO: once llvm-test-suite is converted to TMT, we can just link the test from plan. -summary: Run tests from llvm-test-suite package - -adjust: - - because: "llvm-test-suite is available for Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -test: "$WITH_SCL ./test.sh" - -require: - - git - - clang - - ninja-build - - llvm-test-suite -duration: 1h diff --git a/tests/llvm-test-suite/test.sh b/tests/llvm-test-suite/test.sh deleted file mode 100755 index 85418bc..0000000 --- a/tests/llvm-test-suite/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -# TODO: tmt does not support a remote git repo as a requirement, one has to clone it "manually". - -git clone --depth 1 https://src.fedoraproject.org/rpms/llvm-test-suite.git llvm-test-suite -cd llvm-test-suite/tests/test-suite -./runtest.sh diff --git a/tests/openmp-rpm/main.fmf b/tests/openmp-rpm/main.fmf deleted file mode 100644 index 2344193..0000000 --- a/tests/openmp-rpm/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: Test build a simple RPM package to ensure that -fopenmp works -test: "$WITH_SCL ./runtest.sh" -require: - - rpm-build -adjust: - - because: "libomp not supported in s390x" - when: arch == s390x - enabled: false - - - because: "Use yum in RHEL < 8" - require+: - - yum-utils - environment+: - BUILDDEP_CMD: "yum-builddep" - when: distro < rhel-8 - - - because: "Use dnf in RHEL >= 8, Fedora and CentOS" - require+: - - dnf-plugins-core - environment+: - BUILDDEP_CMD: "dnf builddep" - when: distro >= rhel-8 or distro != rhel - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-build - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-build - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/openmp-rpm/runtest.sh b/tests/openmp-rpm/runtest.sh deleted file mode 100755 index 37647fe..0000000 --- a/tests/openmp-rpm/runtest.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -ex - -${BUILDDEP_CMD} -y test.spec -rpmbuild --define '_sourcedir .' --define '_builddir .' -bb test.spec diff --git a/tests/openmp-rpm/test.c b/tests/openmp-rpm/test.c deleted file mode 100644 index b20d164..0000000 --- a/tests/openmp-rpm/test.c +++ /dev/null @@ -1,7 +0,0 @@ -int main(int argc, char **argv) { - int res = 1; -#pragma omp parallel -#pragma omp single - res = 0; - return res; -} diff --git a/tests/openmp-rpm/test.spec b/tests/openmp-rpm/test.spec deleted file mode 100644 index e317a6a..0000000 --- a/tests/openmp-rpm/test.spec +++ /dev/null @@ -1,36 +0,0 @@ -%global toolchain clang -%{?scl:%global scl_prefix %{scl}-} - -Name: test -Version: 1 -Release: 1 -Summary: Test package for checking that RPM packages using -fopenmp build correctly -License: MIT - -BuildRequires: %{?scl_prefix}clang -BuildRequires: %{?scl_prefix}libomp - -Source0: test.c - -%description -clang was adding RUNPATH to binaries that use OpenMP, and since RUNPATH -is prohibited in Fedora builds, this was causing packages using clang -and OpenMP to fail to build. - -References: -https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild -https://github.com/llvm/llvm-project/commit/9b9d08111b618d74574ba03e5cc3d752ecc56f55 - -%build -clang ${CFLAGS} -c %{SOURCE0} -o test.o -clang ${LDFLAGS} -fopenmp test.o -o main - -%check -./main - -%install -install -d %{buildroot}%{_bindir} -install main %{buildroot}%{_bindir} - -%files -%{_bindir}/main diff --git a/tests/pocl/main.fmf b/tests/pocl/main.fmf deleted file mode 100644 index 1143416..0000000 --- a/tests/pocl/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -# TODO REVIEW: get fitting summary - what's the purpose of this test? Comment from the STI version says: -# -# This is separate from tests.yml because we want to run the tests without -# clang installed. -summary: pocl - -adjust: - - because: "PoCL is shipped with Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -# This test requires a special preparation, see `/tests/tests-pocl` plan. As such, -# it shouldn't be part of the `/tests/default` plan. -tag: - - not-in-default -# rhbz#1582884 -test: "$WITH_SCL ./test.sh" -require: - - git - - ocl-icd-devel - - pocl - - gcc diff --git a/tests/pocl/test.sh b/tests/pocl/test.sh deleted file mode 100755 index fd9f92b..0000000 --- a/tests/pocl/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -# TODO: tmt does not support a remote git repo as a requirement, one has to clone it "manually". - -git clone --depth 1 https://src.fedoraproject.org/rpms/pocl.git pocl -cd pocl/tests/simple-opencl-no-clang -./runtest.sh diff --git a/tests/ppc64le-long-double/main.fmf b/tests/ppc64le-long-double/main.fmf deleted file mode 100644 index 133c75a..0000000 --- a/tests/ppc64le-long-double/main.fmf +++ /dev/null @@ -1,33 +0,0 @@ -summary: Test that gcc and clang use the same long double format on ppc64le -test: $WITH_SCL ./runtest.sh -duration: 1h -# see https://bugzilla.redhat.com/show_bug.cgi?id=2115752 -enabled: false -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - - because: "Fedora CI runs in x86_64 only, emulate with qemu and mock" - require+: - - qemu-user-static - - mock - test: ./runtest-fedora.sh - when: distro == fedora and arch == x86_64 - continue: false - - - enabled: false - when: arch != ppc64le - - - require+: - - gcc - when: distro != fedora - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" diff --git a/tests/ppc64le-long-double/runtest-fedora.sh b/tests/ppc64le-long-double/runtest-fedora.sh deleted file mode 100755 index 25dbb9c..0000000 --- a/tests/ppc64le-long-double/runtest-fedora.sh +++ /dev/null @@ -1,14 +0,0 @@ -set -e - -fedora_release=`rpm -E %{fedora}` -mock_root=fedora-$fedora_release-ppc64le -triple=ppc64le-redhat-linux - -mock -r $mock_root --isolation=simple --install gcc -gcc_output=$(mock -r $mock_root --isolation=simple -q --shell gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -target $triple -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) - -echo "gcc: $gcc_output" -echo "clang: $clang_output" - -test "$gcc_output" = "$clang_output" diff --git a/tests/ppc64le-long-double/runtest.sh b/tests/ppc64le-long-double/runtest.sh deleted file mode 100755 index 8061bd7..0000000 --- a/tests/ppc64le-long-double/runtest.sh +++ /dev/null @@ -1,9 +0,0 @@ -set -e - -gcc_output=$(gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) - -echo "gcc: $gcc_output" -echo "clang: $clang_output" - -test "$gcc_output" = "$clang_output" diff --git a/tests/rhbz_1647130/main.fmf b/tests/rhbz_1647130/main.fmf deleted file mode 100644 index 3445a1b..0000000 --- a/tests/rhbz_1647130/main.fmf +++ /dev/null @@ -1,19 +0,0 @@ -summary: RHBZ1647130 -test: "$WITH_SCL ./test.sh" -require: [] -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - clang-analyzer - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-clang-analyzer - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-analyzer - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/rhbz_1647130/test.sh b/tests/rhbz_1647130/test.sh deleted file mode 100755 index 7fb47ba..0000000 --- a/tests/rhbz_1647130/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -eux - -tmp_cpp=`mktemp -t XXXXX.cpp` -tmp_dir=`mktemp -d` -echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp -scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null -(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID) - diff --git a/tests/rhbz_1657544/from_chars.cpp b/tests/rhbz_1657544/from_chars.cpp deleted file mode 100644 index b76be22..0000000 --- a/tests/rhbz_1657544/from_chars.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(int argc, char **argv) -{ - size_t r=0; - const char *begin = argv[1]; - const char *end = begin + strlen(begin); - from_chars(begin, end, r); - cout << r << '\n'; - return 0; -} diff --git a/tests/rhbz_1657544/main.fmf b/tests/rhbz_1657544/main.fmf deleted file mode 100644 index a775439..0000000 --- a/tests/rhbz_1657544/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: RHBZ1657544 -test: "$WITH_SCL ./test.sh" -require: [] -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" diff --git a/tests/rhbz_1657544/test.sh b/tests/rhbz_1657544/test.sh deleted file mode 100755 index 58c088f..0000000 --- a/tests/rhbz_1657544/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -eux - -clang++ from_chars.cpp -./a.out 100 | grep 100 diff --git a/tests/rhbz_482491/main.fmf b/tests/rhbz_482491/main.fmf deleted file mode 100644 index f0929e9..0000000 --- a/tests/rhbz_482491/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: rhbz-482491 -test: "$WITH_SCL ./test.sh" -require: - - libgcc -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/rhbz_482491/test.sh b/tests/rhbz_482491/test.sh deleted file mode 100755 index 2360238..0000000 --- a/tests/rhbz_482491/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -eux - -find /usr -name 'libgcc_s.so*' && echo "int main(){}" | clang -v -x c - diff --git a/tests/toolchains/hello.c b/tests/toolchains/hello.c deleted file mode 100644 index f5c80a9..0000000 --- a/tests/toolchains/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main(int argc, char **argv) { - printf("Hello World\n"); - return 0; -} diff --git a/tests/toolchains/hello.cpp b/tests/toolchains/hello.cpp deleted file mode 100644 index bda4087..0000000 --- a/tests/toolchains/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main(int argc, char **argv) { - std::cout << "Hello World\n"; - return 0; -} diff --git a/tests/toolchains/main.fmf b/tests/toolchains/main.fmf deleted file mode 100644 index 9b8975b..0000000 --- a/tests/toolchains/main.fmf +++ /dev/null @@ -1,55 +0,0 @@ -# TODO REVIEW: better summary -summary: "" -test: "$WITH_SCL ./test.sh" -require: - - glibc-static - - yum-utils - # This require EPEL/CRB to be enabled on RHEL - - libstdc++-static -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - compiler-rt - - lld - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-compiler-rt - - llvm-toolset-13.0-lld - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-compiler-rt - - llvm-toolset-14.0-lld - when: "collection == llvm-toolset-14.0" - - # lld not supported in s390x or ppc64. If any lld package was added to - # requirements, remove it. - - require-: - - lld - - llvm-toolset-13.0-lld - - llvm-toolset-14.0-lld - when: arch == s390x or arch == ppc64 - - - environment+: - CXXLIBS: "libc++" - require+: - - libcxx-devel - - libcxx-static - when: "distro == fedora" - because: testing against libcxx package in Fedora - - - environment+: - CXXLIBS: "libstdc++" - require+: - - libstdc++ - when: >- - distro == rhel - or distro == centos - because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL - -# TODO REVIEW: are these all requirements? test.sh seems to run quite a lot of stuff, looks like we -# need more packages from LLVM family. diff --git a/tests/toolchains/test.sh b/tests/toolchains/test.sh deleted file mode 100755 index 65594e6..0000000 --- a/tests/toolchains/test.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -eux - -set pipefail - -if [ -z "${CXXLIBS:-}" ]; then - echo "CXXLIBS variable is a required input but it's not specified!" - echo "Test metadata should have picked a proper value, depending on distro." - exit 1 -fi - -status=0 - -test_toolchain() { - - toolchain=$@ - args="" - - while [ $# -gt 0 ]; do - case $1 in - clang) - compiler=$1 - src=hello.c - ;; - clang++) - compiler=$1 - src=hello.cpp - ;; - compiler-rt) - args="$args -rtlib=$1" - ;; - libc++) - args="$args -stdlib=$1" - ;; - libstdc++) - args="$args -stdlib=$1" - ;; - lld) - args="$args -fuse-ld=$1" - ;; - *) - args="$args $1" - ;; - esac - shift - done - - cmd="$compiler $args $src" - rm -f a.out - echo "* $toolchain" - echo " command: $cmd" - if $cmd && ./a.out | grep -q 'Hello World'; then - echo " PASS" - else - echo " FAIL" - status=1 - fi -} - -clang --version -# Repoquery is needed instead yum info for compatibility with RHEL-7 -repoquery -i --installed $(rpm -qf $(which clang)) | grep ^Source -echo "" - -for compiler in clang clang++; do - for rtlib in "" compiler-rt; do - for linker in "" lld; do - for cxxlib in "" $CXXLIBS; do - if [ "$compiler" = "clang" -a -n "$cxxlib" ]; then - continue - fi - for args in "" -static; do - # Skip known failures - # TODO: Fix these - if [[ "$args" = "-static" && "$rtlib" = "compiler-rt" ]]; then - continue - fi - - # Static libc++ needs -pthread - if [[ "$args" = "-static" && "$cxxlib" = "libc++" ]]; then - args="$args -pthread" - fi - - # lld is not supported in s390x and ppc64 - if [[ "$(uname -m)" = "s390x" || "$(uname -m)" = "ppc64" ]] \ - && [[ "$linker" = "lld" ]]; - then - continue - fi - - # compiler-rt does not provide builtins for s390x - if [[ "$(uname -m)" = "s390x" && "$rtlib" = "compiler-rt" ]]; then - continue - fi - - test_toolchain $compiler $rtlib $linker $cxxlib $args - done - done - done - done -done - -exit $status diff --git a/tests/use-dwarf4-by-default/main.fmf b/tests/use-dwarf4-by-default/main.fmf deleted file mode 100644 index 3151d7e..0000000 --- a/tests/use-dwarf4-by-default/main.fmf +++ /dev/null @@ -1,20 +0,0 @@ -summary: Test that clang uses DWARFv4 by default -test: "$WITH_SCL ./test.sh" -require: - - libgcc -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - llvm - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-llvm - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-llvm - when: "collection == llvm-toolset-14.0" diff --git a/tests/use-dwarf4-by-default/test.sh b/tests/use-dwarf4-by-default/test.sh deleted file mode 100755 index 5da8196..0000000 --- a/tests/use-dwarf4-by-default/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -echo "int main(){ return 0; }" | clang -g -v -x c - 2> build.log -# Make sure that clang is using the expected flag to use DWARF 4 -grep -q "\-dwarf-version=4" build.log -# Inspect the binary to double check expected DWARF version -llvm-dwarfdump a.out | grep -i version | grep 0x0004