Skip to content

Commit

Permalink
Downgrade implicit int and implicit function declaration to warning only
Browse files Browse the repository at this point in the history
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.

See https://reviews.llvm.org/D133800 for the public review of these
changes.
  • Loading branch information
AaronBallman authored and tru committed Sep 15, 2022
1 parent 6fe6989 commit c0141f3
Show file tree
Hide file tree
Showing 51 changed files with 148 additions and 141 deletions.
28 changes: 16 additions & 12 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ here. Generic improvements to Clang as a whole or to its underlying
infrastructure are described first, followed by language-specific
sections with improvements to Clang's support for those languages.

Potentially Breaking Changes
============================
These changes are ones which we think may surprise users when upgrading to
Clang |release| because of the opportunity they pose for disruption to existing
code bases.

- The ``-Wimplicit-function-declaration`` and ``-Wimplicit-int`` warning
diagnostics are now enabled by default in C99, C11, and C17. As of C2x,
support for implicit function declarations and 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.
*NOTE* these warnings are expected to default to an error in Clang 16. We
recommend that projects using configure scripts verify the results do not
change before/after setting ``-Werror=implicit-function-declarations`` or
``-Wimplicit-int`` to avoid incompatibility with Clang 16.

Major New Features
------------------

Expand Down Expand Up @@ -245,18 +261,6 @@ 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.
- 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
Expand Down
8 changes: 4 additions & 4 deletions clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def warn_implicit_function_decl : Warning<
InGroup<ImplicitFunctionDeclare>, DefaultIgnore;
def ext_implicit_function_decl_c99 : ExtWarn<
"call to undeclared function %0; ISO C99 and later do not support implicit "
"function declarations">, InGroup<ImplicitFunctionDeclare>, DefaultError;
"function declarations">, InGroup<ImplicitFunctionDeclare>;
def note_function_suggestion : Note<"did you mean %0?">;

def err_ellipsis_first_param : Error<
Expand Down Expand Up @@ -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<ImplicitFunctionDeclare>, DefaultError;
InGroup<ImplicitFunctionDeclare>;
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">;
Expand Down Expand Up @@ -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<ImplicitInt>, DefaultError;
"support implicit int">, InGroup<ImplicitInt>;
def err_param_default_argument : Error<
"C does not support default arguments">;
def err_param_default_argument_redefinition : Error<
Expand Down Expand Up @@ -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<ImplicitInt>, DefaultError;
"implicit int">, InGroup<ImplicitInt>;
def err_missing_type_specifier : Error<
"a type specifier is required for all declarations">;
def err_decimal_unsupported : Error<
Expand Down
2 changes: 1 addition & 1 deletion clang/test/C/drs/dr0xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion clang/test/C/drs/dr1xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'}}
*/
}
Expand Down
28 changes: 14 additions & 14 deletions clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -845,7 +845,7 @@ void test1() {
// CHECK: xor <16 x i8> [[T1]], <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
// CHECK-LE: [[T1:%.+]] = and <16 x i8>
// CHECK-LE: xor <16 x i8> [[T1]], <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
// 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>
Expand Down Expand Up @@ -937,7 +937,7 @@ void test1() {
// CHECK: or <16 x i8> {{%.+}}, [[T1]]
// CHECK-LE: [[T1:%.+]] = xor <16 x i8> {{%.+}}, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
// 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> {{%.+}}, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/builtins-arm-msvc-compat-only.c
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/neon-crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/cxx_for_opencl.clcpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion clang/test/FixIt/fixit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
{
}

Expand Down
4 changes: 2 additions & 2 deletions clang/test/Frontend/fixed_point_errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Frontend/fixed_point_not_enabled.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Frontend/system-header-line-directive.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <noline.h>
#include <line-directive-in-system.h>

// 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
Expand Down
10 changes: 5 additions & 5 deletions clang/test/Headers/arm-cmse-header-ns.c
Original file line number Diff line number Diff line change
@@ -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 <arm_cmse.h>
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Modules/config_macros.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

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}}
}

Expand Down
2 changes: 1 addition & 1 deletion clang/test/Modules/malformed-overload.m
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 2 additions & 4 deletions clang/test/Modules/modulemap-locations.m
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
}
4 changes: 2 additions & 2 deletions clang/test/OpenMP/declare_mapper_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'}}
{}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/PCH/chain-macro-override.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions clang/test/Parser/altivec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
Loading

0 comments on commit c0141f3

Please sign in to comment.