[clang][#51931] Enable `-Wdeclaration-after-statement` for all C versions
-Wdeclaration-after-statement currently only outputs an diagnostic if the user is compiling in C versions older than C99, even if the warning was explicitly requested by the user. This patch makes the warning also available in later C versions. If the C version is C99 or later it is simply a normal warning that is disabled by default (as it is valid C99) and has to be enabled by users. In older versions it remains an extension warning, and therefore affected by -pedantic. The above behaviour also matches GCCs behaviour. Fixes https://bugs.llvm.org/show_bug.cgi?id=51931 Differential Revision: https://reviews.llvm.org/D114787
Loading
Please sign in to comment