aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2022-05-04 08:34:26 -0400
committerAaron Ballman <aaron@aaronballman.com>2022-05-04 08:35:47 -0400
commit2cb2cd242ca08d0bbd2a51a41f1317442e5414fc (patch)
tree8daba516b1e6467fc4eb5207e02bb147650f6de5 /clang/test/SemaObjC
parentb540ee540266f42b238e683c775c32a10c184ab5 (diff)
downloadllvm-2cb2cd242ca08d0bbd2a51a41f1317442e5414fc.zip
llvm-2cb2cd242ca08d0bbd2a51a41f1317442e5414fc.tar.gz
llvm-2cb2cd242ca08d0bbd2a51a41f1317442e5414fc.tar.bz2
Change the behavior of implicit int diagnostics
C89 allowed a type specifier to be elided with the resulting type being int, aka implicit int behavior. This feature was subsequently removed in C99 without a deprecation period, so implementations continued to support the feature. Now, as with implicit function declarations, is a good time to reevaluate the need for this support. This patch allows -Wimplicit-int to issue warnings in C89 mode (off by default), defaults the warning to an error in C99 through C17, and disables support for the feature entirely in C2x. It also removes a warning about missing declaration specifiers that really was just an implicit int warning in disguise and other minor related cleanups.
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/protocols.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaObjC/protocols.m b/clang/test/SemaObjC/protocols.m
index eb27341..ebb9b63 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-warning{{type specifier missing}} \
+- (int)test:(int)param, ..; // expected-error{{type specifier missing}} \
// expected-error{{expected ';' after method prototype}}
@end