aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2022-04-08 16:19:58 -0400
committerAaron Ballman <aaron@aaronballman.com>2022-04-08 16:19:58 -0400
commit11da1b53d8cd3507959022cd790d5a7ad4573d94 (patch)
tree7dae22254eafe39d7d80b54d9f79ae2791a1360f /llvm/unittests/Support/VirtualFileSystemTest.cpp
parent4aaf25b4f7d7695ada313a3159d234b84d2896b2 (diff)
downloadllvm-11da1b53d8cd3507959022cd790d5a7ad4573d94.zip
llvm-11da1b53d8cd3507959022cd790d5a7ad4573d94.tar.gz
llvm-11da1b53d8cd3507959022cd790d5a7ad4573d94.tar.bz2
[C89/C2x] Improve diagnostics around strict prototypes in C
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
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions