forked from OSchip/llvm-project
11da1b53d8
Functions without prototypes in C (also known as K&R C functions) were introduced into C89 as a deprecated feature and C2x is now reclaiming that syntax space with different semantics. However, Clang's -Wstrict-prototypes diagnostic is off-by-default (even in pedantic mode) and does not suffice to warn users about issues in their code. This patch changes the behavior of -Wstrict-prototypes to only diagnose declarations and definitions which are not going to change behavior in C2x mode, and enables the diagnostic in -pedantic mode. The diagnostic is now specifically about the fact that the feature is deprecated. It also adds -Wdeprecated-non-prototype, which is grouped under -Wstrict-prototypes and diagnoses declarations or definitions which will change behavior in C2x mode. This diagnostic is enabled by default because the risk is higher for the user to continue to use the deprecated feature. Differential Revision: https://reviews.llvm.org/D122895 |
||
---|---|---|
.. | ||
Inputs | ||
atomic-property.m | ||
auto-fixit.m | ||
auto-isa-fixit.m | ||
bridge-cast-in-arc.mm | ||
bridge-in-non-arc.m | ||
dereference-addressof.c | ||
fixit-add-synthesize-to-property.m | ||
fixit-autoreleasepool.m | ||
fixit-availability-maccatalyst.m | ||
fixit-availability.c | ||
fixit-availability.mm | ||
fixit-c++2a.cpp | ||
fixit-c++11.cpp | ||
fixit-c90.c | ||
fixit-class-method-messaging.m | ||
fixit-cxx-init-order.cpp | ||
fixit-cxx1y-compat.cpp | ||
fixit-cxx11-attributes.cpp | ||
fixit-cxx11-compat.cpp | ||
fixit-eof-space.c | ||
fixit-errors-1.c | ||
fixit-errors.c | ||
fixit-format-darwin.m | ||
fixit-format-ios-nopedantic.m | ||
fixit-format-ios.m | ||
fixit-function-call.cpp | ||
fixit-include.c | ||
fixit-include.h | ||
fixit-interface-as-param.m | ||
fixit-large-file.cpp | ||
fixit-missing-method-return-type.m | ||
fixit-missing-self-in-block.m | ||
fixit-multiple-selector-warnings.m | ||
fixit-newline-style.c | ||
fixit-nsstring-compare.m | ||
fixit-nullability-declspec.cpp | ||
fixit-objc-arc.m | ||
fixit-objc-bridge-related-attr.m | ||
fixit-objc-bridge-related-property.m | ||
fixit-objc-bridge-related.m | ||
fixit-objc-direct.m | ||
fixit-objc-message-comma-separator.m | ||
fixit-objc-message.m | ||
fixit-objc-missing-method-impl.m | ||
fixit-objc.m | ||
fixit-pmem.cpp | ||
fixit-pragma-attribute.c | ||
fixit-pragma-attribute.cpp | ||
fixit-pragma-pack.c | ||
fixit-recompile.c | ||
fixit-recursive-block.c | ||
fixit-static-assert.cpp | ||
fixit-static-object-decl.m | ||
fixit-suffix.c | ||
fixit-typedef-instead-of-typename-typo.cpp | ||
fixit-unicode-with-utf8-output.c | ||
fixit-unicode.c | ||
fixit-uninit.c | ||
fixit-unrecoverable.c | ||
fixit-unrecoverable.cpp | ||
fixit-unused-lambda-capture.cpp | ||
fixit-vexing-parse-cxx0x.cpp | ||
fixit-vexing-parse.cpp | ||
fixit.c | ||
fixit.cpp | ||
format-darwin.m | ||
format-no-fixit.m | ||
format.m | ||
format.mm | ||
member-mismatch.cpp | ||
messages.cpp | ||
multiarg-selector-fixit.m | ||
no-diagnostics-fixit-info.c | ||
no-fixit.cpp | ||
no-macro-fixit.c | ||
no-typo.c | ||
nullability.mm | ||
objc-literals.m | ||
property-access-fixit.m | ||
selector-fixit.m | ||
typo-crash.cpp | ||
typo-crash.m | ||
typo-location-bugs.cpp | ||
typo-using.cpp | ||
typo.c | ||
typo.cpp | ||
typo.m |