llvm-project/clang
Markus Böck 118f966b46 [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
2022-01-12 18:21:46 +01:00
..
INPUTS
bindings
cmake [Clang] Make Clang copy its CMake modules into the build dir 2022-01-12 09:51:14 +00:00
docs [clang] number labels in asm goto strings after tied inputs 2022-01-11 12:09:24 -08:00
examples
include [clang][#51931] Enable `-Wdeclaration-after-statement` for all C versions 2022-01-12 18:21:46 +01:00
lib [clang][#51931] Enable `-Wdeclaration-after-statement` for all C versions 2022-01-12 18:21:46 +01:00
runtime
test [clang][#51931] Enable `-Wdeclaration-after-statement` for all C versions 2022-01-12 18:21:46 +01:00
tools [clang] Introduce support for disabling warnings in system macros 2022-01-12 08:18:19 +00:00
unittests Revert (2) "[AST] Add RParen loc for decltype AutoTypeloc." 2022-01-12 10:09:37 +00:00
utils [clang] Introduce support for disabling warnings in system macros 2022-01-12 08:18:19 +00:00
www Update Bug report URL to Github Issues 2022-01-06 17:33:25 +08:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Factor out config prefix finding logic 2022-01-07 20:16:18 +00:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/